Beispiel #1
0
 public static void MarkdownXmlOrOpmlFilesOnSingleType(Types.InputType type, Dictionary <Types.InputType, IEnumerable <string> > files)
 {
     // blog, feeds, study, projects
     Assert.Single(files);
     foreach (KeyValuePair <Types.InputType, IEnumerable <string> > entry in files)
     {
         Assert.Equal(type, entry.Key);
         foreach (string file in entry.Value)
         {
             MarkDownOrXmlFiles(file);
             Assert.Contains(type.ToString("g"), file);
         }
     }
 }
        public void ReturnsContentSpecificFolder(Types.InputType type, IEnumerable <string> list, int fileCount)
        {
            Mock <IRepository> mockRepo = new Mock <IRepository>();

            (string GitDirectory, string ContentDirectory) = GetSrc.SrcPath();
            GetFilesFromDiff gitHelper = new GetFilesFromDiff(mockRepo.Object, GitDirectory, "content");
            Dictionary <Types.InputType, IEnumerable <string> > files = gitHelper.PackPaths(list as IEnumerable <string>);

            Assert.Single(files);
            foreach (KeyValuePair <Types.InputType, IEnumerable <string> > entry in files)
            {
                Assert.Equal(type, entry.Key);
                Assert.Equal(fileCount, entry.Value.Count());
                foreach (string file in entry.Value)
                {
                    AnallyExpect.MarkDownOrXmlFiles(file);
                    Assert.Contains(type.ToString("g"), file);
                }
            }
        }