예제 #1
0
 public void User_UpdateEmail_WithInValidEmail()
 {
     Assert.IsTrue(
         BowerbirdThrows.Exception <DesignByContractException>(() =>
                                                               FakeObjects.TestUser()
                                                               .UpdateEmail(FakeValues.InvalidEmail)
                                                               ));
 }
예제 #2
0
 public void TeamsQuery_Constructor_Passed_Null_mediaResourceFactory()
 {
     Assert.False(
         BowerbirdThrows.Exception <DesignByContractException>(
             () => new TeamsViewModelBuilder(
                 new Mock <IDocumentSession>().Object,
                 new Mock <ITeamViewFactory>().Object))
         );
 }
 public void SpeciesController_Constructor_With_Null_UserContext()
 {
     Assert.IsTrue(
         BowerbirdThrows.Exception <DesignByContractException>(
             () => new SpeciesController(
                 _mockCommandProcessor.Object,
                 null,
                 _mockSpeciesViewModelBuilder.Object
                 )));
 }
예제 #4
0
 public void Check_RequireGreaterThanZero_Passing_Zero_Throws_DesignByContractException()
 {
     Assert.IsTrue(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireGreaterThanZero(0, "number")));
 }
예제 #5
0
 public void Check_RequireValidEmail_Passing_An_Empty_String_Throws_DesignByContractException()
 {
     Assert.IsTrue(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireValidEmail(string.Empty, "email")));
 }
예제 #6
0
 public void Check_RequireValidEmail_Passing_An_InValid_Email_Throws_DesignByContractException()
 {
     Assert.IsTrue(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireValidEmail(FakeValues.InvalidEmail, "email")));
 }
예제 #7
0
 public void Check_RequireValidEmail_Passing_A_ValidEmail_Does_Not_Throw_DesignByContractException()
 {
     Assert.IsFalse(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireValidEmail(FakeValues.Email, "email")));
 }
예제 #8
0
 public void Check_RequireNotNullOrWhiteSpace_Passing_WhitespaceString_Throws_DesignByContractException()
 {
     Assert.IsTrue(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireNotNullOrWhitespace("  ", "teststring")));
 }
예제 #9
0
 public void Check_RequireNotNullOrWhiteSpace_Passing_TestString_Does_Not_Throw_DesignByContractException()
 {
     Assert.IsFalse(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireNotNullOrWhitespace("teststring", "teststring")));
 }
예제 #10
0
 public void Check_RequireGreaterThanZero_Passing_One_DoesNotThrow_DesignByContractException()
 {
     Assert.IsFalse(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireGreaterThanZero(1, "number")));
 }
예제 #11
0
 public void AccountController_HttpPost_Login_Passing_Null_AccountLoginInput_Throws_DesignByContractException()
 {
     Assert.IsTrue(BowerbirdThrows.Exception <DesignByContractException>(() => _controller.Login(null)));
 }