public void InitialState_TestingUnauthorized2() { var aggregateId = TestAggregateId.New; var command = new TestUnauthorizedCommand2(aggregateId); var fixture = new AggregateFixture <TestAggregateId, TestAggregate, ITestAggregateState, TestAggregateState>(this); fixture.For(aggregateId) .GivenNothing() .When(command) .ThenExpectResult(r => r.Should().BeOfType <UnauthorizedResult>().And.Ok()); }
public Task <Result> Do(TestUnauthorizedCommand2 command) { throw new UnauthorizedAccessException(); }