public void AddCustomProcessorsObjectTypeCodeConfigAddsObjectTypeCodeProcessor()
        {
            string expectedLoggerOutput = "Using ObjectTypeCodeProcessor processor";

            MockCrmGenericImporterConfig.SetupGet(c => c.ObjectTypeCodeMappingConfig).Returns(objectTypeCodeMappingConfig);

            var importer = new TestCrmGenericImporter(MockLogger.Object, mockStoreReader.Object, storeWriter, MockCrmGenericImporterConfig.Object);

            Assert.IsNotNull(importer);

            MockLogger.Verify(l => l.LogVerbose(expectedLoggerOutput), Times.Once);
            MockCrmGenericImporterConfig.VerifyAll();
        }
        public void DeactivateAllProcesses()
        {
            MockCrmGenericImporterConfig.SetupGet(c => c.ObjectTypeCodeMappingConfig).Returns(new ObjectTypeCodeMappingConfiguration());

            MockCrmGenericImporterConfig.SetupGet(c => c.DeactivateAllProcesses).Returns(true);
            MockCrmGenericImporterConfig.Setup(a => a.ResetProcessesToDeactivate());
            MockCrmGenericImporterConfig.Setup(a => a.ResetPluginsToDeactivate());

            var importer = new TestCrmGenericImporter(MockLogger.Object, mockStoreReader.Object, storeWriter, MockCrmGenericImporterConfig.Object);

            importer.Should().NotBeNull();
            MockCrmGenericImporterConfig.VerifyAll();
        }
        public void EntitiesToSync()
        {
            List <string> entitiesToSync = new List <string>()
            {
                "contactid"
            };

            MockCrmGenericImporterConfig.SetupGet(c => c.ObjectTypeCodeMappingConfig).Returns(new ObjectTypeCodeMappingConfiguration());

            MockCrmGenericImporterConfig.SetupGet(c => c.EntitiesToSync).Returns(entitiesToSync);

            var importer = new TestCrmGenericImporter(MockLogger.Object, mockStoreReader.Object, storeWriter, MockCrmGenericImporterConfig.Object);

            importer.Should().NotBeNull();
            MockCrmGenericImporterConfig.VerifyAll();
        }
        public void FiledsToIgnore()
        {
            List <string> fieldsToIgnore = new List <string>()
            {
                "contactid"
            };

            MockCrmGenericImporterConfig.SetupGet(c => c.ObjectTypeCodeMappingConfig).Returns(new ObjectTypeCodeMappingConfiguration());

            MockCrmGenericImporterConfig.SetupGet(c => c.FiledsToIgnore).Returns(fieldsToIgnore);

            var importer = new TestCrmGenericImporter(MockLogger.Object, mockStoreReader.Object, storeWriter, MockCrmGenericImporterConfig.Object);

            importer.Should().NotBeNull();
            MockCrmGenericImporterConfig.VerifyAll();
        }
        public void ProcessesToDeactivate()
        {
            List <string> processesToDeactivate = new List <string>()
            {
                "contactid"
            };

            MockCrmGenericImporterConfig.SetupGet(c => c.ObjectTypeCodeMappingConfig).Returns(new ObjectTypeCodeMappingConfiguration());

            MockCrmGenericImporterConfig.SetupGet(c => c.ProcessesToDeactivate).Returns(processesToDeactivate);
            MockCrmGenericImporterConfig.Setup(a => a.ResetPluginsToDeactivate());

            var importer = new TestCrmGenericImporter(MockLogger.Object, mockStoreReader.Object, storeWriter, MockCrmGenericImporterConfig.Object);

            importer.Should().NotBeNull();

            MockCrmGenericImporterConfig.VerifyAll();
        }