public void IsCollectionRegistered_CollectionRegisteredAndDropped_False()
        {
            TestInstance.RegisterCollection(Collection, Descriptor, DataBuilder);
            TestInstance.DropCollection(Collection);

            Assert.IsFalse(TestInstance.IsCollectionRegistered(Collection));
        }
Example #2
0
        public void IsCollectionRegistered__DelegatesToCollectionsManager()
        {
            var expectedResult = RandomizationHelper.Instance.GetBool();

            MockedCollectionsManager.Setup(_ => _.IsCollectionRegistered(It.IsAny <ICollection <IData> >()))
            .Returns(expectedResult);

            var result = TestInstance.IsCollectionRegistered(Collection);

            MockedCollectionsManager.Verify(_ => _.IsCollectionRegistered(Collection));
            Assert.AreEqual(expectedResult, result);
        }
        public void IsCollectionRegistered__DelegatedToRepository()
        {
            var expectedResult = RandomizationHelper.Instance.GetBool();

            MockedTestInstance.Setup(_ => _.GetRepository <IData>()).Returns(DataRepository);
            MockedDataRepository.Setup(_ => _.IsCollectionRegistered(It.IsAny <ICollection <IData> >()))
            .Returns(expectedResult);

            var result = TestInstance.IsCollectionRegistered(Collection);

            Assert.AreEqual(expectedResult, result);
            MockedDataRepository.Verify(_ => _.IsCollectionRegistered(Collection));
        }
 public void IsCollectionRegistered_CollectionNeverRegistered_False()
 {
     Assert.IsFalse(TestInstance.IsCollectionRegistered(Collection));
 }
        public void IsCollectionRegistered_RegisteredCollection_True()
        {
            TestInstance.RegisterCollection(Collection, Descriptor, DataBuilder);

            Assert.IsTrue(TestInstance.IsCollectionRegistered(Collection));
        }