public void StepThroughIfAggregateHashNotSetd()
            {
                var pipelineHook = new AggregateStateValidator();
                var aggregate = new FakeAggregate();

                pipelineHook.PostGet(aggregate);
            }
Пример #2
0
            public void StepThroughIfAggregateHashNotSetd()
            {
                var pipelineHook = new AggregateStateValidator();
                var aggregate    = new FakeAggregate();

                pipelineHook.PostGet(aggregate);
            }
            public void StepThroughIfAggregateHashUnchanged()
            {
                var pipelineHook = new AggregateStateValidator();
                var aggregate = new FakeAggregate();

                aggregate.UpdateHash();

                pipelineHook.PostGet(aggregate);
            }
Пример #4
0
            public void StepThroughIfAggregateHashUnchanged()
            {
                var pipelineHook = new AggregateStateValidator();
                var aggregate    = new FakeAggregate();

                aggregate.UpdateHash();

                pipelineHook.PostGet(aggregate);
            }
            public void ThrowMemberAccessExceptionIfHashInvalid()
            {
                var pipelineHook = new AggregateStateValidator();
                var aggregate = new FakeAggregate();

                aggregate.UpdateHash();
                aggregate.State = Guid.NewGuid();

                Assert.Throws<MemberAccessException>(() => pipelineHook.PostGet(aggregate));
            }
Пример #6
0
            public void ThrowMemberAccessExceptionIfHashInvalid()
            {
                var pipelineHook = new AggregateStateValidator();
                var aggregate    = new FakeAggregate();

                aggregate.UpdateHash();
                aggregate.State = Guid.NewGuid();

                Assert.Throws <MemberAccessException>(() => pipelineHook.PostGet(aggregate));
            }