public void User_UpdateEmail_WithInValidEmail() { Assert.IsTrue( BowerbirdThrows.Exception <DesignByContractException>(() => FakeObjects.TestUser() .UpdateEmail(FakeValues.InvalidEmail) )); }
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 ))); }
public void Check_RequireGreaterThanZero_Passing_Zero_Throws_DesignByContractException() { Assert.IsTrue(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireGreaterThanZero(0, "number"))); }
public void Check_RequireValidEmail_Passing_An_Empty_String_Throws_DesignByContractException() { Assert.IsTrue(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireValidEmail(string.Empty, "email"))); }
public void Check_RequireValidEmail_Passing_An_InValid_Email_Throws_DesignByContractException() { Assert.IsTrue(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireValidEmail(FakeValues.InvalidEmail, "email"))); }
public void Check_RequireValidEmail_Passing_A_ValidEmail_Does_Not_Throw_DesignByContractException() { Assert.IsFalse(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireValidEmail(FakeValues.Email, "email"))); }
public void Check_RequireNotNullOrWhiteSpace_Passing_WhitespaceString_Throws_DesignByContractException() { Assert.IsTrue(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireNotNullOrWhitespace(" ", "teststring"))); }
public void Check_RequireNotNullOrWhiteSpace_Passing_TestString_Does_Not_Throw_DesignByContractException() { Assert.IsFalse(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireNotNullOrWhitespace("teststring", "teststring"))); }
public void Check_RequireGreaterThanZero_Passing_One_DoesNotThrow_DesignByContractException() { Assert.IsFalse(BowerbirdThrows.Exception <DesignByContractException>(() => Check.RequireGreaterThanZero(1, "number"))); }
public void AccountController_HttpPost_Login_Passing_Null_AccountLoginInput_Throws_DesignByContractException() { Assert.IsTrue(BowerbirdThrows.Exception <DesignByContractException>(() => _controller.Login(null))); }