Esempio n. 1
0
        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());
        }
Esempio n. 2
0
 public Task <Result> Do(TestUnauthorizedCommand2 command)
 {
     throw new UnauthorizedAccessException();
 }