コード例 #1
0
        public void GivenSupportedFixVersionBytes_Parse_ReturnsObject()
        {
            var byteRepresentation = SupportedFixVersion.Fix43.ToString().ToByteValue();
            var parsed             = SupportedFixVersion.Parse(byteRepresentation.AsSpan());

            Assert.Equal(SupportedFixVersion.Fix43, parsed);
        }
コード例 #2
0
        public void GivenInvalidSupportedFixVersionBytes_Parse_ThrowsNotSupportedException()
        {
            var byteRepresentation = SupportedFixVersion.Fix43.ToString().ToByteValue();

            Assert.Throws <NotSupportedException>(() => SupportedFixVersion.Parse(byteRepresentation.AsSpan(1)));
        }