Beispiel #1
0
        public void Test_TAGFileCellPassGeneration_CompareKnownCellPassConstruction_Folders(string folderName)
        {
            // Get list of TAG files
            var fileNames = Directory.GetFiles(folderName, "*.tag");

            foreach (var tagFileName in fileNames)
            {
                var linesLogFileName    = Path.Combine(Path.GetDirectoryName(tagFileName), $"CellMutationLog-{Path.GetFileName(tagFileName)}.txt.output");
                var mutationLogFileName = Path.Combine(Path.GetDirectoryName(tagFileName), $"CellMutationLog-{Path.GetFileName(tagFileName)}.txt");

                var Lines = new List <string>();
                ICell_NonStatic_MutationHook Hook = DIContext.ObtainRequired <ICell_NonStatic_MutationHook>();

                Hook.SetActions(new CellPassWriter(x => Lines.Add(x)));
                try
                {
                    DITagFileFixture.ReadTAGFileFullPath(tagFileName);
                }
                finally
                {
                    Hook.ClearActions();
                }

                File.WriteAllLines(linesLogFileName, Lines);
                CompareMutationLogs(Lines, mutationLogFileName);
            }
        }
Beispiel #2
0
 public void SetActions(ICell_NonStatic_MutationHook actions)
 {
     AddPassAction     = actions.AddPass;
     RemovePassAction  = actions.RemovePass;
     ReplacePassAction = actions.ReplacePass;
     EmitNoteAction    = actions.EmitNote;
 }
Beispiel #3
0
        public void Test_TAGFileCellPassGeneration_CompareKnownCellPassConstruction_Dimensions2018CaseMachine(string tagFileName, string mutationLogFileName)
        {
            var Lines = new List <string>();
            ICell_NonStatic_MutationHook Hook = DIContext.ObtainRequired <ICell_NonStatic_MutationHook>();

            Hook.SetActions(new CellPassWriter(x => Lines.Add(x)));
            try
            {
                DITagFileFixture.ReadTAGFile("Dimensions2018-CaseMachine", tagFileName);
            }
            finally
            {
                Hook.ClearActions();
            }

            //File.WriteAllLines(Path.Combine(@"C:\temp\SavedMutationLogsFromTests\" + mutationLogFileName), Lines);

            CompareMutationLogs(Lines, Path.Combine("TestData", "TagFiles", "Dimensions2018-CaseMachine", mutationLogFileName));
        }
Beispiel #4
0
 public void SetActions(ICell_NonStatic_MutationHook actions)
 {
     // Nothing to do
 }
Beispiel #5
0
 public Cell_NonStatic_MutationHook(ICell_NonStatic_MutationHook actions) : this()
 {
     SetActions(actions);
 }