public void Set_String_ReturnsSelf(string propertyName, String value) { // Arrange var emptyFluentAction = new EmptyFluentAction(); // Act & Assert emptyFluentAction.Set(value, propertyName).ShouldBeSameAs(emptyFluentAction); }
public void SetRef_ReturnsSelf(string propertyName, int value) { // Arrange var oldValue = new Fixture().Create <int>(); var emptyFluentAction = new EmptyFluentAction(); // Act & Assert emptyFluentAction.Set(value, ref oldValue, propertyName).ShouldBeSameAs(emptyFluentAction); }
public void Set_StringWithNullEmptyOrWhiteSpace_ShouldThrow(string propertyName, String value) { // Arrange var emptyFluentAction = new EmptyFluentAction(); // Act & Assert ArgumentException exception = Should.Throw <ArgumentException>(() => emptyFluentAction.Set(value, propertyName)); exception.Message.ShouldContain("null"); exception.Message.ShouldContain("empty"); exception.Message.ShouldContain("white-space characters"); }
public void SetRef_WithNullEmptyOrWhiteSpace_ShouldThrow(string propertyName, int value) { // Arrange var oldValue = new Fixture().Create <int>(); var emptyFluentAction = new EmptyFluentAction(); // Act & Assert ArgumentException exception = Should.Throw <ArgumentException>(() => emptyFluentAction.Set(value, ref oldValue, propertyName)); exception.Message.ShouldContain("null"); exception.Message.ShouldContain("empty"); exception.Message.ShouldContain("white-space characters"); }