public void GetCommand_should_return_new_instance_of_generic_type_given() { // arrange var router = new StaticRouter<EmptyMockCommand>(); // act ICommand cmd = router.GetCommand(null); // assert Assert.IsType(typeof (EmptyMockCommand), cmd); }
public void should_change_message_label() { var processor = new StaticRouter("other".ToMessageLabel()); var message = new Message( "boo".ToMessageLabel(), new Dictionary <string, object> { { "This", "That" } }, "Body"); var result = processor.Apply(message).ToList(); result.Should().HaveCount(1); result.Single().Label.Name.Should().Be("other"); result.Single().Payload.Should().Be("Body"); }