public async Task CanCloseSheet_CanCloseSheetIsNull_ShouldReturnTrue() { var cancelSheetCommand = new CancelSheetCommand(s => { }, s => true); var canCloseSheet = await cancelSheetCommand.CanCloseSheet(null); canCloseSheet.Should().BeTrue(); }
public async Task CanCloseSheet_CanCloseSheetSet_ShouldReturnCorrect(bool canClose) { var cancelSheetCommand = new CancelSheetCommand(o => { }, o => true, o => canClose); var canCloseSheet = await cancelSheetCommand.CanCloseSheet(null); canCloseSheet.Should().Be(canClose); }
public async Task CanCloseSheet_WithGeneric_CanCloseSheetSet_ShouldReturnCorrect(bool canClose) { var cancelSheetCommand = new CancelSheetCommand <string>(s => { }, s => true, s => canClose); var canCloseSheet = await cancelSheetCommand.CanCloseSheet(null); canCloseSheet.Should().Be(canClose); }
public async Task CanCloseSheet_AsyncCanCloseSheetSet_ShouldReturnCorrect(bool canClose) { var cancelSheetCommand = new CancelSheetCommand(o => { }, o => true, async o => { await Task.Delay(100); return(canClose); }); var canCloseSheet = await cancelSheetCommand.CanCloseSheet(null); canCloseSheet.Should().Be(canClose); }