public Tests() { var source = new ResourceValidatorSource(GetType().Assembly, "Testing.PostTest.Xunit.Schemas.{messageType}.json"); _queue = new InMemoryMessageReader(); _output = new InMemoryValidationOutput(); _monitor = new QueueMonitor(_queue, new DirectMessageConverter(), new MessageValidator(source), _output); _monitor.Start(); }
protected override void OnStart(string[] args) { // replace these with your own adapters IMessageReader reader = new InMemoryMessageReader(); IMessageConverter converter = new DirectMessageConverter(); IValidatorSource source = new FileValidatorSource(Path.Combine(_baseDirectory, "validators")); var output = new SerilogValidationOutput(); _monitor = new QueueMonitor(reader, converter, new MessageValidator(source), output); _monitor.Start(); }