Browse Source

[SL.Core] Use Assert.Contains instead.

pull/1087/head
Dirk Lemstra 7 years ago
parent
commit
930f3573eb
  1. 4
      tests/SixLabors.Core.Tests/Helpers/DebugGuardTests.cs
  2. 6
      tests/SixLabors.Core.Tests/Helpers/GuardTests.cs

4
tests/SixLabors.Core.Tests/Helpers/DebugGuardTests.cs

@ -59,7 +59,7 @@ namespace SixLabors.Helpers.Tests
});
Assert.Equal("myParamName", exception.ParamName);
Assert.True(exception.Message.Contains($"Value must be less than {max}."));
Assert.Contains($"Value must be less than {max}.", exception.Message);
}
[Theory]
@ -79,7 +79,7 @@ namespace SixLabors.Helpers.Tests
});
Assert.Equal("myParamName", exception.ParamName);
Assert.True(exception.Message.Contains($"Value must be less than or equal to 1."));
Assert.Contains($"Value must be less than or equal to 1.", exception.Message);
}
[Fact]

6
tests/SixLabors.Core.Tests/Helpers/GuardTests.cs

@ -25,7 +25,7 @@ namespace SixLabors.Helpers.Tests
});
Assert.Equal("myParamName", exception.ParamName);
Assert.True(exception.Message.Contains($"Value must be less than {max}."));
Assert.Contains($"Value must be less than {max}.", exception.Message);
}
[Theory]
@ -45,7 +45,7 @@ namespace SixLabors.Helpers.Tests
});
Assert.Equal("myParamName", exception.ParamName);
Assert.True(exception.Message.Contains($"Value must be less than or equal to 1."));
Assert.Contains($"Value must be less than or equal to 1.", exception.Message);
}
[Fact]
@ -85,7 +85,7 @@ namespace SixLabors.Helpers.Tests
});
Assert.Equal("myParamName", exception.ParamName);
Assert.True(exception.Message.Contains($"Value must be greater than or equal to 2."));
Assert.Contains($"Value must be greater than or equal to 2.", exception.Message);
}
[Theory]

Loading…
Cancel
Save