private static void TestProfileValues(EightBimProfile profile) { Assert.IsNotNull(profile); Assert.AreEqual(25, profile.Values.Count()); foreach (EightBimValue value in profile.Values) { Assert.IsNotNull(value.ToByteArray()); } }
private static void TestProfile(EightBimProfile profile) { Assert.IsNotNull(profile); Assert.AreEqual(2, profile.ClipPaths.Count()); ClipPath first = profile.ClipPaths.First(); Assert.AreEqual("Path 1", first.Name); XDocument doc = XDocument.Load(first.Path.CreateNavigator().ReadSubtree()); Assert.AreEqual(@"<svg width=""200"" height=""200""><g><path fill=""#00000000"" stroke=""#00000000"" stroke-width=""0"" stroke-antialiasing=""false"" d=""M 45 58
L 80 124
L 147 147
L 45 147
L 45 58 Z
"" /></g></svg>", doc.ToString(SaveOptions.DisableFormatting)); ClipPath second = profile.ClipPaths.Skip(1).First(); Assert.AreEqual("Path 2", second.Name); doc = XDocument.Load(second.Path.CreateNavigator().ReadSubtree()); Assert.AreEqual(@"<svg width=""200"" height=""200""><g><path fill=""#00000000"" stroke=""#00000000"" stroke-width=""0"" stroke-antialiasing=""false"" d=""M 52 144
L 130 57
L 157 121
L 131 106
L 52 144 Z
"" /></g></svg>", doc.ToString(SaveOptions.DisableFormatting)); }