switch from FluentAssertions to Shouldly
This commit is contained in:
@@ -19,7 +19,7 @@ public class Decode
|
||||
var resultString = Base32.Encode(testBytes);
|
||||
var resultBytes = Base32.Decode(resultString);
|
||||
|
||||
resultBytes.Should().BeEquivalentTo(testBytes);
|
||||
resultBytes.ShouldBeEquivalentTo(testBytes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Decode
|
||||
public void WhenCalledWithValidString_ShouldReturnValidByteArray(string str, byte[] expected)
|
||||
{
|
||||
var actualBytesArray = Base32.Decode(str);
|
||||
actualBytesArray.Should().Equal(expected);
|
||||
actualBytesArray.ShouldBe(expected);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -44,7 +44,7 @@ public class Decode
|
||||
public void WhenCalledWithValidStringThatEndsWithPaddingSign_ShouldReturnValidByteArray(string testString, byte[] expected)
|
||||
{
|
||||
var actualBytesArray = Base32.Decode(testString);
|
||||
actualBytesArray.Should().Equal(expected);
|
||||
actualBytesArray.ShouldBe(expected);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -54,7 +54,7 @@ public class Decode
|
||||
public void WhenCalledWithValidStringWithoutPaddingSign_ShouldReturnValidByteArray(string testString, byte[] expected)
|
||||
{
|
||||
var actualBytesArray = Base32.Decode(testString);
|
||||
actualBytesArray.Should().Equal(expected);
|
||||
actualBytesArray.ShouldBe(expected);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -66,7 +66,7 @@ public class Decode
|
||||
public void WhenCalledWithNotValidString_ShouldThrowFormatException(string testString)
|
||||
{
|
||||
Action action = () => Base32.Decode(testString);
|
||||
action.Should().Throw<FormatException>();
|
||||
action.ShouldThrow<FormatException>();
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -74,6 +74,6 @@ public class Decode
|
||||
[InlineData("")]
|
||||
public void WhenCalledWithNullString_ShouldReturnEmptyArray(string? testString)
|
||||
{
|
||||
Base32.Decode(testString).Should().BeEmpty();
|
||||
Base32.Decode(testString).ShouldBeEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Encode
|
||||
var resultBytes = Base32.Decode(testString);
|
||||
var resultString = Base32.Encode(resultBytes);
|
||||
|
||||
resultString.Should().Be(testString);
|
||||
resultString.ShouldBe(testString);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -47,7 +47,7 @@ public class Encode
|
||||
public void WhenCalledWithNotEmptyByteArray_ShouldReturnValidString(string expected, byte[] testArray)
|
||||
{
|
||||
var str = Base32.Encode(testArray);
|
||||
str.Should().Be(expected);
|
||||
str.ShouldBe(expected);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -56,7 +56,7 @@ public class Encode
|
||||
public void WhenCalledWithEmptyByteArray_ShouldReturnEmptyString(byte[]? testArray)
|
||||
{
|
||||
var actualBase32 = Base32.Encode(testArray);
|
||||
actualBase32.Should().Be(string.Empty);
|
||||
actualBase32.ShouldBe(string.Empty);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -68,7 +68,7 @@ public class Encode
|
||||
|
||||
var charsWritten = Base32.Encode(testArray, output);
|
||||
|
||||
charsWritten.Should().Be(0);
|
||||
output.Should().Equal(['1', '2', '3', '4']);
|
||||
charsWritten.ShouldBe(0);
|
||||
output.ShouldBe(['1', '2', '3', '4']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user