Exemplo n.º 1
0
        public void UpdateBatchColorDefinition()
        {
            var cd = new ColorDefinition(COLORS_DEFINITION_DARK_TEST_FILE);
            var batchColorDefinition = cd.GetFileColorDefinitionSet(FileExtensionSupported.BAT);

            foreach (var b in batchColorDefinition)
            {
                b.Value.Italic    = true;
                b.Value.Bold      = true;
                b.Value.ColorName = "NavajoWhite";
            }
            cd.SetFileColorDefinitionSet(FileExtensionSupported.BAT, batchColorDefinition);

            var newFileName = cd.FileName + ".json";

            cd.Save(newFileName);

            var cd2 = new ColorDefinition(newFileName);

            batchColorDefinition = cd2.GetFileColorDefinitionSet(FileExtensionSupported.BAT);

            foreach (var b in batchColorDefinition)
            {
                DS.Assert.ValueTypeProperties(b.Value, new { ColorName = "NavajoWhite", Bold = true, Italic = true });
            }
            File.Delete(newFileName);
        }