Ejemplo n.º 1
0
        public void TestIgnoreRoot()
        {
            TestGraph.Factory graph = TestGraph.GetSimpleGraph();
            CoreDataSerializer serializer = new CoreDataSerializer(graph) {IgnoreRoot = true};
            serializer.Refresh();

            Assert.AreEqual(3, serializer.GraphNodes.Count());
            Assert.IsTrue(serializer.Types.Contains(typeof(TestGraph.Worker)));
            Assert.IsFalse(serializer.Types.Contains(typeof(TestGraph.Factory)));
        }
Ejemplo n.º 2
0
 public void TestIgnoreTypes()
 {
     TestGraph.Factory graph = TestGraph.GetRecursiveGraph();
     CoreDataSerializer serializer = new CoreDataSerializer(graph);
     serializer.IgnoredTypes.Add(typeof (TestGraph.Worker));
     serializer.Refresh();
     Assert.AreEqual(1, serializer.GraphNodes.Count());
 }