예제 #1
0
        public void InitialState_TestingForbidden2()
        {
            var aggregateId = TestAggregateId.New;
            var command     = new TestForbiddenCommand2(aggregateId);

            var fixture = new AggregateFixture <TestAggregateId, TestAggregate,
                                                ITestAggregateState, TestAggregateState>(this);

            fixture.For(aggregateId)
            .GivenNothing()
            .When(command)
            .ThenExpectResult(r => r.Should().BeOfType <ForbiddenResult>().And.Ok());
        }
예제 #2
0
 public Task <Result> Do(TestForbiddenCommand2 command)
 {
     throw new ForbiddenException();
 }