@Test public void shouldAcceptValidId() { lengthOf(1); assertTrue(authenticationStrategy.validate(headerDecoder)); lengthOf(2); assertTrue(authenticationStrategy.validate(headerDecoder)); }
public boolean validate(final SessionHeaderDecoder header) { final char[] senderCompID = header.senderCompID(); final int senderCompIDLength = header.senderCompIDLength(); return validSenderIds.contains(senderCompID, senderCompIDLength); }
SenderCompIdValidationStrategy implements MessageValidationStrategy { public boolean validate(final SessionHeaderDecoder header) { final char[] senderCompID = header.senderCompID(); final int senderCompIDLength = header.senderCompIDLength(); return validSenderIds.contains(senderCompID, senderCompIDLength); } }
SenderCompIdValidationStrategy implements MessageValidationStrategy { public boolean validate(final SessionHeaderDecoder header) { final char[] senderCompID = header.senderCompID(); final int senderCompIDLength = header.senderCompIDLength(); return validSenderIds.contains(senderCompID, senderCompIDLength); } SenderCompIdValidationStrategy(final Collection<String> validSenderIds); }
SenderCompIdValidationStrategy implements MessageValidationStrategy { public boolean validate(final SessionHeaderDecoder header) { final char[] senderCompID = header.senderCompID(); final int senderCompIDLength = header.senderCompIDLength(); return validSenderIds.contains(senderCompID, senderCompIDLength); } SenderCompIdValidationStrategy(final Collection<String> validSenderIds); boolean validate(final SessionHeaderDecoder header); int invalidTagId(); int rejectReason(); }
SenderCompIdValidationStrategy implements MessageValidationStrategy { public boolean validate(final SessionHeaderDecoder header) { final char[] senderCompID = header.senderCompID(); final int senderCompIDLength = header.senderCompIDLength(); return validSenderIds.contains(senderCompID, senderCompIDLength); } SenderCompIdValidationStrategy(final Collection<String> validSenderIds); boolean validate(final SessionHeaderDecoder header); int invalidTagId(); int rejectReason();  }