Merged interfaces to classes

This commit is contained in:
Martin Berg Alstad
2023-07-13 14:00:42 +02:00
parent 00d777d985
commit 0de20200f5
16 changed files with 41 additions and 58 deletions

View File

@ -51,13 +51,19 @@ public class ExtensionsTests
[Test]
public void GetString_NegativeLength()
{
Assert.Throws(typeof(ArgumentOutOfRangeException), () => _bytes.GetString(-1));
Assert.Throws<ArgumentOutOfRangeException>(() => _bytes.GetString(-1));
}
[Test]
public void GetString_LengthGreaterThanByteArrayLength()
{
Assert.Throws(typeof(ArgumentOutOfRangeException), () => _bytes.GetString(_bytes.Length + 1));
Assert.Throws<ArgumentOutOfRangeException>(() => _bytes.GetString(_bytes.Length + 1));
}
[Test]
public void GetString_LengthShorterThanByteArrayLength()
{
Assert.That(_bytes.GetString(_bytes.Length / 2), Is.EqualTo("Hello "));
}
#endregion