示例#1
0
 ToNext(string currentRoute)
 {
     return(transportCommandIn =>
            new TransportCommand <TestCommand, TestMetadata, string>(
                transportCommandIn.DomainCommand,
                TestMetadataFactory.NextMetadata(currentRoute, transportCommandIn.Metadata)));
 }
示例#2
0
        public void NextMetadata_RemovesRoutingSlipHead()
        {
            var id = Guid.NewGuid();
            var initialRoutingSlip  = Enumerable.Range(0, 10).Select(x => x.ToString()).ToList();
            var expectedRoutingSlip = initialRoutingSlip.Skip(1).ToList();

            var initialMetadata  = new TestMetadata(id, initialRoutingSlip);
            var expectedMetadata = new TestMetadata(id, expectedRoutingSlip);

            var result = TestMetadataFactory.NextMetadata(initialRoutingSlip.First(), initialMetadata);

            result.Should().BeEquivalentTo(expectedMetadata);
        }