public void ScopeTest_Test_Success() { // Arrange var scope = _ep.GetScope(); var scopedObject = scope.Get <IInterfaceModel>(); var scopedObject2 = scope.Get <IInterfaceModel>(); // Act { var innerScope = _ep.GetScope(); var innerScopedObject = innerScope.Get <IInterfaceModel>(); var innerScopedObject2 = innerScope.Get <IInterfaceModel>(); // Assert // Two Scopes are never the same object Assert.NotEqual(scope, innerScope); // Objects of same types from different Scopes in different scopes are not the same object Assert.NotEqual(scopedObject, innerScopedObject); // Objects of same types from different Scopes in the same scope are the same object Assert.Equal(scopedObject, scopedObject2); Assert.Equal(innerScopedObject, innerScopedObject2); } }