示例#1
0
        public void GivenNoBeginString_Validate_ReturnsFalse()
        {
            var message    = new TestFixMessageBuilder(TestFixMessageBuilder.DefaultBody).AddBeginString(string.Empty).Build();
            var uut        = new FixVersionValidator();
            var msgContext = new FixMessageContext().Setup(message);
            var result     = uut.IsValid(message.AsSpan(), msgContext);

            Assert.False(result);
        }
示例#2
0
        public void GivenFix5WithNoSenderCompId_Validate_ReturnsFalse()
        {
            var message    = new TestFixMessageBuilder("35=A|56=CLIENT|34=177|52=20090107-18:15:16|98=0|108=30|").AddBeginString(SupportedFixVersion.Fix50).Build();
            var uut        = new FixVersionValidator();
            var msgContext = new FixMessageContext().Setup(message);
            var result     = uut.IsValid(message.AsSpan(), msgContext);

            Assert.False(result);
        }
示例#3
0
        public void GivenValidFixVersion_Validate_ReturnsTrue(string input)
        {
            byte[] message    = new TestFixMessageBuilder(input).Build();
            var    uut        = new FixVersionValidator();
            var    msgContext = new FixMessageContext().Setup(message);
            var    result     = uut.IsValid(message.AsSpan(), msgContext);

            Assert.True(result);
        }