예제 #1
0
        public void Dispose_Disposed_CallsProtectedDisposeWithTrue()
        {
            var mockService = new FakeService();

            mockService.Dispose();
            mockService.StartTest();

            mockService.Dispose();

            Assert.True(mockService.ProtectedDisposeCalled);
            Assert.True(mockService.ProtectedDisposeCallParameter);
        }
예제 #2
0
        public void CheckValidState_Disposed_ThrowsObjectDisposedException()
        {
            var mockService = new FakeService();

            mockService.Dispose();

            Assert.Throws <InvalidOperationException>(() => mockService.CheckValidState());
        }
예제 #3
0
        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);
        }
예제 #4
0
        static void Service_can_be_explictly_disposed()
        {
            var fakeService = new FakeService();

            fakeService.Dispose();
        }
예제 #5
0
 public void Service_can_be_explictly_disposed()
 {
     var fakeService = new FakeService();
     fakeService.Dispose();
 }
예제 #6
0
 protected void teardown_handler_scenario()
 {
     _stubHttpService.Dispose();
     ServiceProvider.Dispose();
 }