public void Dispose_RemovedDbSets() { // Arrange _mockContext = new MockEfContext(typeof(TestEntity)); // Act _mockContext.Object.Dispose(); // Assert Assert.ThrowsException <NullReferenceException>(() => _mockContext.GetDbSet <TestEntity>(), "The dbset should not exist once the context has been disposed."); }
public void Initialize() { _mockContext = new MockEfContext(typeof(TestCompany)); _repository = new EfRepository <TestCompany>(_mockContext.Object); _service = new ConcreteCompanyService <TestCompany>(_repository); }
public void Initialize() { _mockContext = new MockEfContext(typeof(TestEntity)); }
public void Initialize() { _mockContext = new MockEfContext(typeof(TestQuote)); _repository = new EfRepository <TestQuote>(_mockContext.Object); _service = new QuoteService <TestQuote>(_repository); }
public void Initialize() { var _mockContext = new MockEfContext(typeof(TestEntity)).Object; _repository = new EfRepository <TestEntity>(_mockContext); }
public void Initialize() { _mockContext = new MockEfContext(typeof(TestNetworkConfiguration)); _repository = new EfRepository <TestNetworkConfiguration>(_mockContext.Object); _service = new NetworkConfigurationService <TestNetworkConfiguration>(_repository); }