Ejemplo n.º 1
0
 public void TestMapInstanceToSingleTonDoesNotReturnPreviousSignletonAferUnMapInstanceToSingletonIsInvoiked()
 {
     var origPM = new TestPM ();
     DI.MapInstanceToSingleton<TestPM> (new TestPM());
     DI.UnMapInstanceFromSingleton<TestPM> ();
     Assert.AreNotEqual (origPM, DI.Get<TestPM> ());
 }
Ejemplo n.º 2
0
 public void TestMapInstanceToSingleTon()
 {
     DI.MapSingleton<TestPM> ();
     var pm = new TestPM ();
     DI.MapInstanceToSingleton<TestPM> (pm);
     Assert.AreEqual (pm, DI.Get<TestPM> ());
 }
Ejemplo n.º 3
0
 public void TestMapInstanceToSingleTon()
 {
     DI.MapSingleton<TestPM>();
     var pm = new TestPM();
     DI.MapInstanceToSingleton<TestPM>(pm);
     pm.ShouldEqual(DI.Get<TestPM>());
 }
Ejemplo n.º 4
0
        public void TestMapInstanceToSingleTon()
        {
            DI.MapSingleton <TestPM>();
            var pm = new TestPM();

            DI.MapInstanceToSingleton <TestPM>(pm);
            Assert.AreEqual(pm, DI.Get <TestPM>());
        }
Ejemplo n.º 5
0
        public void TestMapInstanceToSingleTonDoesNotReturnPreviousSignletonAferUnMapInstanceToSingletonIsInvoiked()
        {
            var origPM = new TestPM();

            DI.MapInstanceToSingleton <TestPM> (new TestPM());
            DI.UnMapInstanceFromSingleton <TestPM> ();
            Assert.AreNotEqual(origPM, DI.Get <TestPM> ());
        }
Ejemplo n.º 6
0
        public void TestMapInstanceToSingleTonDoesNotReturnPreviousSignletonAferUnMapInstanceToSingletonIsInvoiked()
        {
            // ReSharper disable once InconsistentNaming
            var origPM = new TestPM();

            DI.MapInstanceToSingleton <TestPM>(new TestPM());
            DI.UnMapInstanceFromSingleton <TestPM>();
            Assert.AreNotEqual(origPM, DI.Get <TestPM>());
        }
Ejemplo n.º 7
0
 public void TestMapInstanceToSingleTonDoesNotReturnPreviousSignletonAferUnMapInstanceToSingletonIsInvoiked()
 {
     // ReSharper disable once InconsistentNaming
     var origPM = new TestPM();
     DI.MapInstanceToSingleton<TestPM>(new TestPM());
     DI.UnMapInstanceFromSingleton<TestPM>();
     origPM.ShouldNotEqual(DI.Get<TestPM>());
 }