Exemple #1
0
        public void AddInstanceExtensionMethod_AddRunningInstance_IsRetrievableInterface()
        {
            var container = CreateNewContainer();

            ITestInterface expected = new ComposableTestClass();

            container.AddInstance(expected);

            var actual = container.GetService <ITestInterface>();

            Assert.ReferenceEquals(expected, actual);
        }
Exemple #2
0
        public void AddInstanceExtensionMethod_AddRunningInstance_IsRetrievableExport()
        {
            var container = CreateNewContainer();

            var expected = new ComposableTestClass();

            container.AddInstance(expected);

            var actual = container.GetExport <ComposableTestClass>();

            Assert.ReferenceEquals(expected, actual);
        }