Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[Fact]
public async Task ShouldClosePeriodCorrectly()
{
// arrange
var periodToClose = TestDataCreator.CreateTestPeriod(...);
var periodRepository = GiveMe.StubPeriodRepository()
.WithOneActivePeriod(periodToClose)
.Build();
var periodService = new PeriodService(
periodRepository);
// act
await periodService.ClosePeriodAsync(periodToClose.Id);
// assert
var updatedPeriod = await periodRepository.GetPeriod(
periodToClose.Id);
updatedPeriod.IsActive.Should().BeFalse();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.