test: Unit tests for some TestLibrary classes

recyclarr
Robert Dailey 3 years ago
parent 7604397c26
commit 48aeb2d7c5

@ -0,0 +1,17 @@
using FluentAssertions;
using NUnit.Framework;
namespace TestLibrary.Tests
{
[TestFixture]
[Parallelizable(ParallelScope.All)]
public class StreamBuilderTest
{
[Test]
public void FromString_UsingString_ShouldOutputSameString()
{
var stream = StreamBuilder.FromString("test");
stream.ReadToEnd().Should().Be("test");
}
}
}

@ -0,0 +1,17 @@
using FluentAssertions;
using NUnit.Framework;
namespace TestLibrary.Tests
{
[TestFixture]
[Parallelizable(ParallelScope.All)]
public class StringUtilsTest
{
[Test]
public void TrimmedString_Newlines_AreStripped()
{
var testStr = "\r\ntest\r\n";
StringUtils.TrimmedString(testStr).Should().Be("test");
}
}
}
Loading…
Cancel
Save