public async Task AuthoriseAsync() { // Arrange var componentUnderTest = new DefaultAsyncCommand(); // Act var actual = await componentUnderTest.AuthoriseAsync(); // Assert actual.ShouldHaveSameValueAs(true); }
public void Target() { // Arrange var componentUnderTest = new DefaultAsyncCommand(); // Act componentUnderTest.Target = "target"; // Assert componentUnderTest.Target.ShouldHaveSameValueAs("target"); }
public void Result() { // Arrange var componentUnderTest = new DefaultAsyncCommand(); // Act componentUnderTest.Result = "result"; // Assert componentUnderTest.Result.ShouldHaveSameValueAs("result"); }
public async Task ExecuteAsync() { // Arrange var componentUnderTest = new DefaultAsyncCommand(); // Act await componentUnderTest.ExecuteAsync(); // Assert componentUnderTest.OnBeforeInitialiseTargetAsyncCalled.ShouldHaveSameValueAs(true); componentUnderTest.OnInitialiseTargetAsyncCalled.ShouldHaveSameValueAs(true); componentUnderTest.OnAuthoriseAsyncCalled.ShouldHaveSameValueAs(true); componentUnderTest.OnBeforeExecuteAsyncCalled.ShouldHaveSameValueAs(true); componentUnderTest.OnExecuteAsyncCalled.ShouldHaveSameValueAs(true); componentUnderTest.OnAfterExecuteAsyncCalled.ShouldHaveSameValueAs(true); componentUnderTest.OnAfterExecuteAsyncCalledWithException.ShouldHaveSameValueAs(false); }