public void Dispose_Disposed_CallsProtectedDisposeWithTrue() { var mockService = new FakeService(); mockService.Dispose(); mockService.StartTest(); mockService.Dispose(); Assert.True(mockService.ProtectedDisposeCalled); Assert.True(mockService.ProtectedDisposeCallParameter); }
public void CheckValidState_Disposed_ThrowsObjectDisposedException() { var mockService = new FakeService(); mockService.Dispose(); Assert.Throws <InvalidOperationException>(() => mockService.CheckValidState()); }
public async Task Dispose_Initialised_CallsProtectedDisposeWithTrue() { var mockService = new FakeService(); await mockService.InitialiseAsync(); mockService.StartTest(); mockService.Dispose(); Assert.True(mockService.ProtectedDisposeCalled); Assert.True(mockService.ProtectedDisposeCallParameter); }
static void Service_can_be_explictly_disposed() { var fakeService = new FakeService(); fakeService.Dispose(); }
public void Service_can_be_explictly_disposed() { var fakeService = new FakeService(); fakeService.Dispose(); }
protected void teardown_handler_scenario() { _stubHttpService.Dispose(); ServiceProvider.Dispose(); }