コード例 #1
0
        public void IsCollectionRegisteredWithDescriptor_CollectionRegisteredWithOther_False()
        {
            var otherDescriptor = new Mock <INonTerminalDescriptor>().Object;

            TestInstance.RegisterCollection(Collection, Descriptor, DataBuilder);

            Assert.IsFalse(TestInstance.IsCollectionRegisteredWithDescriptor(Collection, otherDescriptor));
        }
コード例 #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));
        }
コード例 #3
0
 public void IsCollectionRegisteredWithDescriptor_CollectionNotRegistered_False()
 {
     Assert.IsFalse(TestInstance.IsCollectionRegisteredWithDescriptor(Collection, Descriptor));
 }
コード例 #4
0
        public void IsCollectionRegisteredWithDescriptor_CollectionRegisteredWithDescriptor_True()
        {
            TestInstance.RegisterCollection(Collection, Descriptor, DataBuilder);

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