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); }
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); }
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); }