Esempio n. 1
0
        public void InitialState_TestingUnauthorized3()
        {
            var aggregateId = TestAggregateId.New;
            var command     = new TestUnauthorizedCommand(aggregateId);

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

            fixture.For(aggregateId)
            .GivenUser("test", "Test User")
            .When(command)
            .ThenExpectResult(r => r.Should().BeEquivalentTo(Result.Success).And.Ok());
        }
Esempio n. 2
0
        public void InitialState_TestingUnauthorized()
        {
            var aggregateId = TestAggregateId.New;
            var command     = new TestUnauthorizedCommand(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. 3
0
 public Task <Result> Do(TestUnauthorizedCommand command)
 {
     return(Task.FromResult(Result.Success));
 }