TestStringUtils.cs 561 B

12345678910111213141516171819202122
  1. using Xunit;
  2. namespace Tede.Data.Tests.Utils
  3. {
  4. public class TestStringUtils
  5. {
  6. [Fact]
  7. public void TestReplaceEndsWith()
  8. {
  9. var replaced = StringUtils.ReplaceEndsWith("UserName DESC", " DESC", string.Empty);
  10. Assert.Equal("UserName", replaced);
  11. }
  12. [Fact]
  13. public void TestReplaceEndsWithIgnoreCase()
  14. {
  15. var replaced = StringUtils.ReplaceEndsWithIgnoreCase("UserName desc", " DESC", string.Empty);
  16. Assert.Equal("UserName", replaced);
  17. }
  18. }
  19. }