private static void TestProfileValues(IEightBimProfile profile) { Assert.IsNotNull(profile); Assert.AreEqual(25, profile.Values.Count()); var firstValue = profile.Values.First(); Assert.AreEqual(1061, firstValue.ID); byte[] bytes = new byte[16] { 154, 137, 173, 93, 40, 109, 186, 33, 2, 200, 203, 169, 103, 5, 63, 219 }; CollectionAssert.AreEqual(bytes, firstValue.ToByteArray()); foreach (var value in profile.Values) { Assert.IsNotNull(value.ToByteArray()); } }
private static void TestProfile(IEightBimProfile profile) { Assert.IsNotNull(profile); Assert.AreEqual(2, profile.ClipPaths.Count()); var 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)); var 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)); }