// gets a provider that will return all four test templates unless exclusions are applied
        private ConfigurationTemplateInputProvider GetExclusionTestProvider()
        {
            var provider = new ConfigurationTemplateInputProvider();
            provider.AddTemplatePath(TemplateCreateUtility.TestTemplatePath);

            return provider;
        }
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesByWildcardName()
        {
            var wildcard = "*Alice*"; // NOTE: this will fail if you have templates called "Alice." But why would you have that?

            var provider = new ConfigurationTemplateInputProvider();
            provider.AddTemplatePath(wildcard);

            var templates = provider.CreateTemplateList();

            Assert.AreEqual(2, templates.Count());
            Assert.IsTrue(templates.Any(x => x.Name == AliceTemplate.Name));
            Assert.IsTrue(templates.Any(x => x.Name == AlicesonTemplate.Name));
        }
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesByWildcardPath()
        {
            var wildcard = TemplateCreateUtility.TestTemplatePath + "/A*"; // should include Alice and Aliceson

            var provider = new ConfigurationTemplateInputProvider();
            provider.AddTemplatePath(wildcard);

            var templates = provider.CreateTemplateList();

            Assert.AreEqual(2, templates.Count());
            Assert.IsTrue(templates.Any(x => x.Name == AliceTemplate.Name));
            Assert.IsTrue(templates.Any(x => x.Name == AlicesonTemplate.Name));
        }
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesBySingleWildcardPath()
        {
            var wildcard = TemplateCreateUtility.TestTemplatePath + "/A????" + AliceTemplate.Name.Substring(5); // should include Alice

            var provider = new ConfigurationTemplateInputProvider();
            provider.AddTemplatePath(wildcard);

            var templates = provider.CreateTemplateList();

            Assert.AreEqual(1, templates.Count());
            Assert.IsTrue(templates.First().Name == AliceTemplate.Name);
        }
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesByPath()
        {
            var provider = new ConfigurationTemplateInputProvider();
            provider.AddTemplatePath(TemplateCreateUtility.TestTemplatePath);

            var templates = provider.CreateTemplateList();

            Assert.AreEqual(4, templates.Count());
        }
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesByFolderID()
        {
            var tempTemplatesFolderID = TemplateCreateUtility.TestTemplateFolder.ID.ToString();

            var provider = new ConfigurationTemplateInputProvider();
            provider.AddTemplatePath(tempTemplatesFolderID);

            var templates = provider.CreateTemplateList();

            Assert.AreEqual(4, templates.Count());
        }
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplateByTemplateID()
        {
            var provider = new ConfigurationTemplateInputProvider();
            provider.AddTemplatePath(AliceTemplate.ID.ToString());

            var templates = provider.CreateTemplateList();

            Assert.AreEqual(1, templates.Count());
            Assert.AreEqual(templates.First().Name, AliceTemplate.Name);
        }
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplateByName()
        {
            var provider = new ConfigurationTemplateInputProvider();
            provider.AddTemplatePath(FlowerChildTemplate.Name);

            var templates = provider.CreateTemplateList();

            Assert.AreEqual(1, templates.Count());
            Assert.AreEqual(templates.First().Name, FlowerChildTemplate.Name);
        }