Ejemplo n.º 1
0
 public void getLoginTest()
 {
     string login = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     string name = string.Empty; // TODO: Initialize to an appropriate value
     User target = new User(login, password, name); // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     actual = target.getLogin();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Ejemplo n.º 2
0
        public Boolean insertUser(User user, Type type, String errorMethod)
        {
            int evaluetionMethod;
            EvaluetionMethodInfo emInfo = user.getEvaluetionMethodInfo();
            if(user.getEvaluetionMethodInfo().getEvaluetionMethod().Equals(EvaluetionMethod.Grade))
                evaluetionMethod = 0;
            else
                evaluetionMethod = 1;

            String insertUserString = "INSERT INTO USER (login, password, name, evaluetionMethod, " +
                                                         "higherLimit, lowerLimit, step) " +
                                                         "VALUES ('" +
                                                         user.getLogin() + "', '" +
                                                         user.getPassword() + "', '" +
                                                         user.getName() + "', " +
                                                         evaluetionMethod + ", " +
                                                         emInfo.getHigherLimit() + ", " +
                                                         emInfo.getLowerLimit() + ", '" +
                                                         emInfo.getStep().ToString() + "')";

            return executeNonQuery(insertUserString, type, errorMethod, "Insert user into databese failed.");
        }