public async Task InitialiseAsnc_Default_CallsInitialiseServiceAsync() { var mockService = new FakeService(); mockService.StartTest(); await mockService.InitialiseAsync(); Assert.True(mockService.InitialiseServiceAsyncCalled); }
public async Task DisposeAsync_NotInitialised_CallsDisposeServiceAsync() { var mockService = new FakeService(); mockService.StartTest(); await mockService.DisposeAsync(); Assert.True(mockService.DisposeServiceAsyncCalled); }
public async Task InitialiseAsnc_Disposed_DoesNotCallInitialiseServiceAsync() { var mockService = new FakeService(); await mockService.DisposeAsync(); mockService.StartTest(); await mockService.InitialiseAsync(); Assert.False(mockService.InitialiseServiceAsyncCalled); }
public void Dispose_NotInitialised_CallsProtectedDisposeWithTrue() { var mockService = new FakeService(); mockService.StartTest(); mockService.Dispose(); Assert.True(mockService.ProtectedDisposeCalled); Assert.True(mockService.ProtectedDisposeCallParameter); }
public async Task DisposeAsync_NotInitialised_CallsProtectedDisposeWithFalse() { var mockService = new FakeService(); mockService.StartTest(); await mockService.DisposeAsync(); Assert.True(mockService.ProtectedDisposeCalled); Assert.False(mockService.ProtectedDisposeCallParameter); }