public void GivenSupportedFixVersionBytes_Parse_ReturnsObject() { var byteRepresentation = SupportedFixVersion.Fix43.ToString().ToByteValue(); var parsed = SupportedFixVersion.Parse(byteRepresentation.AsSpan()); Assert.Equal(SupportedFixVersion.Fix43, parsed); }
public void GivenInvalidSupportedFixVersionBytes_Parse_ThrowsNotSupportedException() { var byteRepresentation = SupportedFixVersion.Fix43.ToString().ToByteValue(); Assert.Throws <NotSupportedException>(() => SupportedFixVersion.Parse(byteRepresentation.AsSpan(1))); }