public void GivenInvalidSupportedFixVersionBytes_TryParse_ReturnsFalse() { var byteRepresentation = SupportedFixVersion.Fix50.ToString().ToByteValue(); var result = SupportedFixVersion.TryParse(byteRepresentation.AsSpan(1), out var parsed); Assert.False(result); }
public void GivenSupportedFixVersionBytes_TryParse_ReturnsTrue() { var byteRepresentation = SupportedFixVersion.Fix50.ToString().ToByteValue(); var result = SupportedFixVersion.TryParse(byteRepresentation.AsSpan(), out var parsed); Assert.Equal(SupportedFixVersion.Fix50, parsed); Assert.True(result); }