public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesByPath()
        {
            var provider = new ConfigurationTemplateInputProvider();

            provider.AddTemplatePath(TemplateCreateUtility.TestTemplatePath);

            var templates = provider.CreateTemplateList();

            Assert.AreEqual(4, templates.Count());
        }
Пример #2
0
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesByPath()
        {
            var provider = new ConfigurationTemplateInputProvider();

            provider.AddTemplatePath(TestingContants.TestTemplatePath);

            var templates = provider.CreateTemplateList();

            templates.Count().Should().Be(4);
        }
        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);
        }
        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);
        }
Пример #5
0
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplateByName()
        {
            var provider = new ConfigurationTemplateInputProvider();

            provider.AddTemplatePath(_flowerChildTemplate.Name);

            var templates = provider.CreateTemplateList().ToArray();

            templates.Length.Should().Be(1);
            templates.First().Name.Should().Be(_flowerChildTemplate.Name);
        }
        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());
        }
Пример #7
0
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesByFolderID()
        {
            var tempTemplatesFolderId = TestingContants.TestTemplateFolder.ID.ToString();

            var provider = new ConfigurationTemplateInputProvider();

            provider.AddTemplatePath(tempTemplatesFolderId);

            var templates = provider.CreateTemplateList();

            templates.Count().Should().Be(4);
        }
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesBySingleWildcardName()
        {
            var wildcard = "?????" + AliceTemplate.Name.Substring(5);

            var provider = new ConfigurationTemplateInputProvider();

            provider.AddTemplatePath(wildcard);

            var templates = provider.CreateTemplateList();

            Assert.AreEqual(1, templates.Count());
            Assert.IsTrue(templates.First().Name == AliceTemplate.Name);
        }
Пример #9
0
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesBySingleWildcardName()
        {
            var wildcard = "?????" + _aliceTemplate.Name.Substring(5);

            var provider = new ConfigurationTemplateInputProvider();

            provider.AddTemplatePath(wildcard);

            var templates = provider.CreateTemplateList().ToArray();

            templates.Length.Should().Be(1);
            templates.First().Name.Should().Be(_aliceTemplate.Name);
        }
        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));
        }
Пример #12
0
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesByWildcardPath()
        {
            var wildcard = TestingContants.TestTemplatePath + "/A*";             // should include Alice and Allison

            var provider = new ConfigurationTemplateInputProvider();

            provider.AddTemplatePath(wildcard);

            var templates = provider.CreateTemplateList().ToArray();

            templates.Length.Should().Be(2);
            templates.Should().Contain(t => t.Name == _aliceTemplate.Name);
            templates.Should().Contain(x => x.Name == _allisonTemplate.Name);
        }
Пример #13
0
        public void TemplateInputProvider_GetTemplates_IncludesExpectedTemplatesByWildcardName()
        {
            const string wildcard = "*Al*";

            var provider = new ConfigurationTemplateInputProvider();

            provider.AddTemplatePath(wildcard);

            var templates = provider.CreateTemplateList().ToArray();

            templates.Length.Should().Be(2);
            templates.Should().Contain(x => x.Name == _aliceTemplate.Name);
            templates.Should().Contain(x => x.Name == _allisonTemplate.Name);
        }