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()); }
public Task <Result> Do(TestForbiddenCommand2 command) { throw new ForbiddenException(); }