Exemple #1
0
        public void NotSetAndGet_Should_OK()
        {
            var instanceHolder     = new NbConstHolder();
            var mockHolderItemAuto = instanceHolder.Get <MockHolderItemB>();

            mockHolderItemAuto.ShouldNotNull("mockHolderItemAuto");

            var mockHolderItemAuto2 = instanceHolder.Get <MockHolderItemB>();

            mockHolderItemAuto2.ShouldSame(mockHolderItemAuto);
        }
Exemple #2
0
        public void SetAndGet_Should_OK()
        {
            var instanceHolder = new NbConstHolder();
            var mockItem       = new MockHolderItem();

            instanceHolder.Set(mockItem);

            var holderMockItem = instanceHolder.Get <MockHolderItem>();

            holderMockItem.ShouldNotNull("holderMockItem");
            holderMockItem.ShouldSame(mockItem);

            var holderMockItem2 = instanceHolder.Get <MockHolderItem>();

            holderMockItem2.ShouldSame(mockItem);
        }