public void CreateChecklistItemsRetrieverTest()
        {
            // Arrange.
            const string FieldName = "Checklist";
            const string AnswerProcessName = "AnswerProcess";

            var dtm = new Mock<IDynamicTypeManager>();
            dtm.Setup(x => x.GetEditableRootType(AnswerProcessName)).Returns(typeof(RefProcess));

            var factory = new ProcessFieldItemsRetrieverFactory(dtm.Object);

            // Act.
            var checklistRetriever = (ChecklistItemsRetriever)factory.CreateItemsRetriever(typeof(TestEditable), FieldName);

            // Assert.
            Assert.IsNotNull(checklistRetriever);
            Assert.AreEqual(typeof(RefProcess), checklistRetriever.ItemType);
        }
        public void CreateReverseCrossReferenceItemsRetrieverTest()
        {
            // Arrange.
            const string FieldName = "RCR";
            const string ReferencedProcessName = "RCRProcess";

            var dtm = new Mock<IDynamicTypeManager>();
            dtm.Setup(x => x.GetEditableRootType(ReferencedProcessName)).Returns(typeof(RefProcess));

            var factory = new ProcessFieldItemsRetrieverFactory(dtm.Object);

            // Act.
            var rcrRetriever = (ReverseCrossReferenceItemsRetriever)factory.CreateItemsRetriever(typeof(TestEditable), FieldName);

            // Assert.
            Assert.IsNotNull(rcrRetriever);
            Assert.AreEqual(typeof(RefProcess), rcrRetriever.ItemType);
        }
        public void CreateSampleItemsRetrieverTest()
        {
            // Arrange.
            const string FieldName = "Sample";

            var dtm = Mock.Create<IDynamicTypeManager>(Behavior.Loose);
            var factory = new ProcessFieldItemsRetrieverFactory(dtm);

            // Act.
            var sampleRetriever = (SampleItemsRetriever)factory.CreateItemsRetriever(typeof(TestEditable), FieldName);

            // Assert.
            Assert.IsNotNull(sampleRetriever);
            Assert.AreEqual(typeof(ISampleEdit), sampleRetriever.ItemType);
        }