public void IsCollectionRegisteredWithDescriptor_CollectionRegisteredWithOther_False()
        {
            var otherDescriptor = new Mock <INonTerminalDescriptor>().Object;

            TestInstance.RegisterCollection(Collection, Descriptor, DataBuilder);

            Assert.IsFalse(TestInstance.IsCollectionRegisteredWithDescriptor(Collection, otherDescriptor));
        }
Ejemplo n.º 2
0
        public void IsCollectionRegisteredWithDescriptor__DelegatedToCollectionsManager()
        {
            var expectedResult = RandomizationHelper.Instance.GetBool();

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

            var result = TestInstance.IsCollectionRegisteredWithDescriptor(Collection, Descriptor);

            Assert.AreEqual(expectedResult, result);
            MockedCollectionsManager.Verify(_ => _.IsCollectionRegisteredWithDescriptor(Collection, Descriptor));
        }
 public void IsCollectionRegisteredWithDescriptor_CollectionNotRegistered_False()
 {
     Assert.IsFalse(TestInstance.IsCollectionRegisteredWithDescriptor(Collection, Descriptor));
 }
        public void IsCollectionRegisteredWithDescriptor_CollectionRegisteredWithDescriptor_True()
        {
            TestInstance.RegisterCollection(Collection, Descriptor, DataBuilder);

            Assert.IsTrue(TestInstance.IsCollectionRegisteredWithDescriptor(Collection, Descriptor));
        }