Beispiel #1
0
 public static TestMetadata NextMetadata(
     string route,
     TestMetadata t)
 {
     return(new TestMetadata(
                t.CorrelationId,
                NextRoute(route, t.RoutingSlip)));
 }
Beispiel #2
0
        private static TestMetadata CreateTestMetaData(Guid id, int range)
        {
            var metadata = new TestMetadata(
                id,
                Enumerable.Range(0, range).Select(i => i.ToString()).ToList());

            return(metadata);
        }
Beispiel #3
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);
        }