Exemple #1
0
        public void WhenFileExtensionIsAlreadyAdded_ItIsNotAddedAgain()
        {
            var resourceType = new StubResourceType("test/plain", ".txt");
            resourceType.AddFileExtension(".doc");
            resourceType.AddFileExtension(".doc");

            resourceType.FileExtensions.ElementAt(0).ShouldEqual(".txt");
            resourceType.FileExtensions.ElementAt(1).ShouldEqual(".doc");
            resourceType.FileExtensions.Count().ShouldEqual(2);
        }
        public void FindsFilesForAllFileExtensions()
        {
            var resourceType = new StubResourceType("text/css", ".css");
            resourceType.AddFileExtension(".txt");

            var resources = _instance.FindResources(resourceType).ToList();

            resources.Count.ShouldEqual(2);
            AssertContains(resources, EmbeddedNs + ".Embedded1.css");
            AssertContains(resources, EmbeddedNs + ".Embedded1.txt");
        }