public void IsEqualTo_When_same_value_by_specific_compare_It_should_not_throw() { const string value = "The value"; const string expected = "the value"; ShouldNotThrow( () => Ensure.That(value, ParamName).IsEqualTo(expected, StringComparison.OrdinalIgnoreCase), () => EnsureArg.IsEqualTo(value, expected, StringComparison.OrdinalIgnoreCase, ParamName)); }
public void IsEqualTo_When_same_value_It_should_not_throw() { const string value = "The value"; const string expected = value; ShouldNotThrow( () => Ensure.That(value, ParamName).IsEqualTo(expected), () => EnsureArg.IsEqualTo(value, expected, ParamName)); }
public void IsEqualTo_When_different_values_It_throws_ArgumentException() { const string value = "The value"; const string expected = "Other value"; ShouldThrow <ArgumentException>( string.Format(ExceptionMessages.Strings_IsEqualTo_Failed, value, expected), () => Ensure.That(value, ParamName).IsEqualTo(expected), () => EnsureArg.IsEqualTo(value, expected, ParamName)); }
public void IsEqualTo_When_same_value_by_specific_compare_It_should_not_throw() { const string value = "The value"; const string expected = "the value"; var returnedValue = Ensure.That(value, ParamName).IsEqualTo(expected, StringComparison.OrdinalIgnoreCase); AssertReturnedAsExpected(returnedValue, value); Action a = () => EnsureArg.IsEqualTo(value, expected, StringComparison.OrdinalIgnoreCase, ParamName); a.ShouldNotThrow(); }
public void IsEqualTo_When_same_value_It_should_not_throw() { const string value = "The value"; const string expected = value; var returnedValue = Ensure.That(value, ParamName).IsEqualTo(expected); AssertReturnedAsExpected(returnedValue, value); Action a = () => EnsureArg.IsEqualTo(value, expected, ParamName); a.ShouldNotThrow(); }