public void AffectsWpfCommand_Null_ShouldThrow() { // Arrange var emptyFluentAction = new EmptyFluentAction(); // Act & Assert Should.Throw <ArgumentNullException>(() => emptyFluentAction.Affects((IWpfCommand)null)); }
public void AffectsProperty_ReturnsSelf() { // Arrange var emptyFluentAction = new EmptyFluentAction(); // Act & Assert emptyFluentAction.Affects(new Fixture().Create <string>()).ShouldBeSameAs(emptyFluentAction); }
public void AffectsIWpfCommand_ReturnsSelf() { // Arrange var fixture = new Fixture().Customize(new AutoMoqCustomization()); var emptyFluentAction = new EmptyFluentAction(); // Act & Assert emptyFluentAction.Affects(fixture.Create <IWpfCommand>()).ShouldBeSameAs(emptyFluentAction); }
public void AffectsProperty_NullEmptyOrWhiteSpace_ShouldThrow(string propertyName) { // Arrange var emptyFluentAction = new EmptyFluentAction(); // Act & Assert ArgumentException exception = Should.Throw <ArgumentException>(() => emptyFluentAction.Affects(propertyName)); exception.Message.ShouldContain("null"); exception.Message.ShouldContain("empty"); exception.Message.ShouldContain("white-space characters"); }