Skip to content

Commit

Permalink
test: TruncateAtWordTests
Browse files Browse the repository at this point in the history
  • Loading branch information
abhith committed Sep 14, 2020
1 parent a5d36b9 commit cf8fc0e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Code.Library.Tests/Extensions/StringExtensionsTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using Code.Library.Extensions;
using FluentAssertions;
using System;
using System.Globalization;
using System.Threading;
using Code.Library.Extensions;
using FluentAssertions;
using Xunit;

namespace Code.Library.Tests.Extensions
Expand Down Expand Up @@ -128,6 +128,13 @@ public void ToFriendlyUrlTest()
input.ToFriendlyUrl().Should().BeEquivalentTo(expected);
}

[Fact]
public void TruncateAtWordTests()
{
"This is a long sentence".TruncateAtWord(6).Should().Be("This");
"This is a long sentence".TruncateAtWord(7).Should().Be("This is");
}

[Fact]
public void UrlAvailableTest()
{
Expand Down

0 comments on commit cf8fc0e

Please sign in to comment.