public void PaletteColoursSaved()
        {
            PaletteRunner
            .Setup(palette =>
            {
                byte value = 0;
                foreach (var colour in palette.Colours)
                {
                    colour.Red   = value++;
                    colour.Green = value++;
                    colour.Blue  = value++;
                }
            })
            .Verify(document =>
            {
                Assert.AreEqual(256, document.PaletteNode().ChildNodes.Count);

                byte value = 0;
                for (int i = 0; i < 256; i++)
                {
                    var colourNode = document.ColourNode(i);
                    Assert.AreEqual(value++, int.Parse(colourNode.Attributes["Red"].Value));
                    Assert.AreEqual(value++, int.Parse(colourNode.Attributes["Green"].Value));
                    Assert.AreEqual(value++, int.Parse(colourNode.Attributes["Blue"].Value));
                }
            });
        }
 public void PaletteTransparentIndexSaved()
 {
     PaletteRunner.Setup(palette => palette.TransparentIndex = 0).Verify("0", "Transparent");
     PaletteRunner.Setup(palette => palette.TransparentIndex = 25).Verify("25", "Transparent");
 }
 public void PaletteUsedCountSaved()
 {
     PaletteRunner.Setup(palette => palette.UsedCount = 12).Verify("12", "Used");
     PaletteRunner.Setup(palette => palette.UsedCount = 823).Verify("823", "Used");
 }
 public void PaletteMappingSaved()
 {
     PaletteRunner.Setup(palette => palette.Type = PaletteType.Next256).Verify("Next256", "Mapping");
     PaletteRunner.Setup(palette => palette.Type = PaletteType.Next512).Verify("Next512", "Mapping");
     PaletteRunner.Setup(palette => palette.Type = PaletteType.Custom).Verify("Custom", "Mapping");
 }