Пример #1
0
 public void Controller_SignUp_State_ProperAttributes()
 {
     controller = Controller.GetInstance();
     RentItServer.ITU.DatabaseWrapperObjects.User user = controller.SignUp(testNameSignup, testEmailSignup, testPasswordSignup);
     testId = user.Id;
     Assert.IsNotNull(user);
     Assert.AreEqual(testNameSignup, user.Username);
     Assert.AreEqual(testEmailSignup, user.Email);
 }
Пример #2
0
 public void Controller_SignUp_Parameter_ValidValidEmpty()
 {
     controller = Controller.GetInstance();
     try
     {
         RentItServer.ITU.DatabaseWrapperObjects.User user = controller.SignUp(testname, testmail, "");
         Assert.Fail("No exception was raised");
     }
     catch (ArgumentException)
     {
         //this is good
     }
 }
Пример #3
0
 public void Controller_SignUp_Parameter_ValidValidValid()
 {
     controller = Controller.GetInstance();
     try
     {
         RentItServer.ITU.DatabaseWrapperObjects.User user = controller.SignUp(testNameSignup, testEmailSignup,
                                                                               testPasswordSignup);
     }
     catch (Exception e)
     {
         Assert.Fail("An exception was thrown " + e);
     }
 }
Пример #4
0
 public void Controller_SignUp_Parameter_NullNullNull()
 {
     controller = Controller.GetInstance();
     try
     {
         RentItServer.ITU.DatabaseWrapperObjects.User user = controller.SignUp(null, null, null);
         Assert.Fail("No exception was raised");
     }
     catch (ArgumentNullException)
     {
         //this is good
     }
 }