public static void ReadSimpleValue_InvalidTypes_ShouldThrowInvalidOperationException(string hexEncoding) { byte[] encoding = hexEncoding.HexToByteArray(); var reader = new CborReader(encoding); Assert.Throws <InvalidOperationException>(() => reader.ReadSimpleValue()); Assert.Equal(encoding.Length, reader.BytesRemaining); }
internal static void ReadSimpleValue_SingleValue_HappyPath(CborSimpleValue expectedResult, string hexEncoding) { byte[] encoding = hexEncoding.HexToByteArray(); var reader = new CborReader(encoding); CborSimpleValue actualResult = reader.ReadSimpleValue(); Assert.Equal(expectedResult, actualResult); Assert.Equal(CborReaderState.Finished, reader.PeekState()); }