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); }
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 } }
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); } }
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 } }