Ejemplo n.º 1
0
        public void Setup()
        {
            templateManager  = MockObjects.MockObjects.GetMockTemplateManager();
            provisionManager = MockObjects.MockObjects.GetMockProvisionManager();

            pnpTemplateHandler   = new PnPTemplateHandler(templateManager.Object, provisionManager.Object);
            searchTemplateHadler = new SharePointSearchHandler(templateManager.Object, provisionManager.Object);
        }
Ejemplo n.º 2
0
        public void Can_PnPHandler_Provision_When_Config_Enabled()
        {
            templateManager.Setup(x => x.DirectoryExists(It.IsAny <string>())).Returns(true);
            pnpTemplateHandler = new PnPTemplateHandler(templateManager.Object, provisionManager.Object);

            pnpTemplateHandler.Provision(MockObjects.MockObjects.GetImportElement(false, true), Environment.CurrentDirectory, It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>());

            templateManager.Verify(x => x.GetTemplates(It.IsAny <string>()), Times.Once);
            templateManager.Verify(x => x.DirectoryExists(It.IsAny <string>()), Times.Once);
        }