Ejemplo n.º 1
0
        public void GivenTheNextNextVersionWhenFooterAndNumberAreUsedThenTheResponseIsNegative()
        {
            SignedVersion version = aggregate.Version;
            SignedVersion next    = version.Next().Next();

            Assert.False(next.IsNext(version.Footer, version.Number));
        }
Ejemplo n.º 2
0
        public void GivenThePreviousVersionThenTheResponseIsNegative()
        {
            SignedVersion version = aggregate.Version;
            SignedVersion next    = version.Next();

            Assert.False(version.IsNext(next));
        }
Ejemplo n.º 3
0
        public void GivenTheNextVersionThenTheResponseIsPositive()
        {
            SignedVersion version = aggregate.Version;
            SignedVersion next    = version.Next();

            Assert.True(next.IsNext(version));
        }
Ejemplo n.º 4
0
        public void GivenAVersionThenTheHeaderOfTheNextVersionNumberIsOneHigherThanThePreviousVersion()
        {
            SignedVersion version = aggregate.Version;
            SignedVersion next    = version.Next();

            Assert.True(next.Number - version.Number == 1);
        }
Ejemplo n.º 5
0
        public void GivenAVersionThenTheHeaderOfTheNextVersionIsTheFooterOfThePreviousVersion()
        {
            SignedVersion version = aggregate.Version;
            SignedVersion next    = version.Next();

            Assert.Equal(version.Footer, next.Header);
        }
Ejemplo n.º 6
0
        public void GivenAVersionThenTheNextVersionIsReturned()
        {
            SignedVersion version = aggregate.Version;
            SignedVersion next    = version.Next();

            Assert.True(next.IsNext(version));
        }
Ejemplo n.º 7
0
        private void Prepare(
            out SignedVersion first,
            out SignedVersion second,
            out SignedVersion third,
            out SignedVersion[] sequence)
        {
            var aggregate = new SerializableAggregateRoot();

            first    = aggregate.Version;
            second   = first.Next();
            third    = second.Next();
            sequence = new[] { first, third, second };
        }