コード例 #1
0
        public void Should_TryParse_Return_False_When_Invalid_Data_Overflow()
        {
            // Act
            var parsed = TickMessage.TryParse($"2018-04-17 17:51:22.123456,96.0700,{long.MaxValue},0,0.0000,0.0000,4145784264,O,19,143A,2,17", out _);

            // Assert
            Assert.IsFalse(parsed);
        }
コード例 #2
0
        public void Should_TryParse_Protocol62_Return_True(string cultureName)
        {
            // Arrange
            TestHelper.SetThreadCulture(cultureName);

            // Act
            var parsed = TickMessage.TryParse(_messageProtocol62, out var tickMessage);

            // Assert
            Assert.IsTrue(parsed);
            Assert.AreEqual(tickMessage, _expectedMessageProtocol62);
        }