Exemplo n.º 1
0
 public void getEvaluetionMethodInfoTest()
 {
     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
     EvaluetionMethodInfo expected = null; // TODO: Initialize to an appropriate value
     EvaluetionMethodInfo actual;
     actual = target.getEvaluetionMethodInfo();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo 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.");
        }