Skip to content

Commit 7eaa153

Browse files
author
AndrewMorgan1
committed
Added FormatException test to HumanBytesExtensionsTests
1 parent 6bb757a commit 7eaa153

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/ByteFlow.Tests/HumanBytesExtensionsTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,11 @@ public void RoundTrip_InvalidStrings_ShouldFailGracefully(string input)
155155
Assert.False(success);
156156
Assert.Equal(0, result);
157157
}
158+
159+
[Fact]
160+
public void ToBytes_InputWithoutSuffix_ShouldThrow()
161+
{
162+
Assert.Throws<FormatException>(() => "123".ToBytes());
163+
}
158164
}
159165
}

0 commit comments

Comments
 (0)