コード例 #1
0
            public void StepThroughIfAggregateHashNotSetd()
            {
                var pipelineHook = new AggregateStateValidator();
                var aggregate = new FakeAggregate();

                pipelineHook.PreSave(aggregate, null);
            }
コード例 #2
0
            public void StepThroughIfAggregateHashNotSetd()
            {
                var pipelineHook = new AggregateStateValidator();
                var aggregate    = new FakeAggregate();

                pipelineHook.PreSave(aggregate, null);
            }
コード例 #3
0
            public void ThrowMemberAccessExceptionIfHashInvalid()
            {
                var pipelineHook = new AggregateStateValidator();
                var aggregate    = new FakeAggregate();

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

                Assert.Throws <MemberAccessException>(() => pipelineHook.PreSave(aggregate, null));
            }
コード例 #4
0
            public void ThrowMemberAccessExceptionIfHashInvalid()
            {
                var pipelineHook = new AggregateStateValidator();
                var aggregate = new FakeAggregate();

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

                Assert.Throws<MemberAccessException>(() => pipelineHook.PreSave(aggregate, null));
            }