Examples of FakeDB


Examples of com.mongodb.FakeDB

    }

    @Override
    public FakeDB get(String dbName) {
        if (!dbs.containsKey(dbName)) {
            dbs.put(dbName, new FakeDB());
        }
        return dbs.get(dbName);
    }
View Full Code Here

Examples of logicLayer.FakeDB

    }
   
    private int login(String username, String password)
    {
      int loginStatus=0;
      FakeDB fakeDB = FakeDB.getDB();
      loginStatus=fakeDB.signIn(username.substring(1), password.substring(1));
      System.out.println("username: " + username + ". login status: "+loginStatus);
      return loginStatus;
    }
View Full Code Here

Examples of logicLayer.FakeDB

    }
   
    private boolean signup(String username, String password)
    {
      boolean signUpStatus= true;
      FakeDB fakeDB = FakeDB.getDB();
      signUpStatus=fakeDB.signUp(username.substring(1), password.substring(1));
      return signUpStatus;
    }
View Full Code Here

Examples of logicLayer.FakeDB

        String password = (String) Sinput.readObject();
        //str = str.toUpperCase();
        String toWrite="";
        if(username.charAt(0)=='0' && password.charAt(0)=='0')
        {
          FakeDB fakeDB = FakeDB.getDB();
          loginStatus=fakeDB.signIn(username.substring(1), password.substring(1));
          System.out.println("username: " + username + ". login status: "+loginStatus);
          if(loginStatus>=0)
            toWrite+="0";//"username: " + username.substring(1) + " OK";
          else
            toWrite+="1";//"username: " + username.substring(1) + " Bad";
        }
        else if(username.charAt(0)=='1' && password.charAt(0)=='1')
        {
          FakeDB fakeDB = FakeDB.getDB();
          signUpStatus=fakeDB.signUp(username.substring(1), password.substring(1));
          System.out.println("username: " + username + ". login status: "+loginStatus);
          if(signUpStatus==true)
            toWrite+="0";//"username: " + username.substring(1) + " OK";
          else
            toWrite+="1";//"username: " + username.substring(1) + " Bad";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.