Beispiel #1
0
        public void AdvancesOver_should_be_true_if_some_coordinates_added()
        {
            var a = new StreamCoordinates(
                new[]
            {
                new StreamPosition {
                    Partition = 0, Offset = 1
                },
                new StreamPosition {
                    Partition = 1, Offset = 1
                },
                new StreamPosition {
                    Partition = 2, Offset = 1
                }
            });

            var b = new StreamCoordinates(
                new[]
            {
                new StreamPosition {
                    Partition = 0, Offset = 1
                },
                new StreamPosition {
                    Partition = 1, Offset = 1
                }
            });

            a.AdvancesOver(b).Should().BeTrue();
            b.AdvancesOver(a).Should().BeFalse();
        }
Beispiel #2
0
        public void AdvancesOver_should_be_false_for_equal_coordinates()
        {
            var a = new StreamCoordinates(
                new[]
            {
                new StreamPosition {
                    Partition = 0, Offset = 1
                },
                new StreamPosition {
                    Partition = 1, Offset = 1
                },
                new StreamPosition {
                    Partition = 2, Offset = 1
                }
            });

            a.AdvancesOver(a).Should().BeFalse();
        }