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()); }
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()); }
public Task <Result> Do(TestUnauthorizedCommand command) { return(Task.FromResult(Result.Success)); }