public void When_Unregister_called_with_registered_MockService_Then_removes_MockService() { var mockService = new FakeHttpService(); FakeHttpServiceRepository.Unregister(mockService); FakeHttpServiceRepository.GetServiceMockById(mockService.ServiceId) .Should().BeNull("Because the mockService was unregistered"); }
public void When_GetServiceMockById_called_with_registered_port_Then_returns_registered_MockService() { var mockService = new FakeHttpService(); FakeHttpServiceRepository.GetServiceMockById(mockService.ServiceId) .Should().Be(mockService, "Because the MockService self-registered."); FakeHttpServiceRepository.Unregister(mockService); }
public void When_GetServiceMockById_called_with_unregistered_Id_Then_returns_null() { FakeHttpServiceRepository.GetServiceMockById("foo") .Should().BeNull("Because no MockService is registered at this port"); }