Ejemplo n.º 1
0
        public void TestCreate02()
        {
            IStorage storage = new BinaryStorage();
            GraphController graphController = new GraphController(null);
            EdgeController edgeController = new EdgeController(graphController);
            IVisualEdge edge00 = new VisualEdge(edgeController, 0x30000001, 0x30000002, false);

            edge00.Serialize(storage);
            storage.Seek(0, SeekOrigin.Begin);
            IVisualEdge edge01 = VisualEdge.Create(edgeController, storage);

            Assert.AreEqual(edge00.EdgeId, edge01.EdgeId);
            Assert.AreEqual(edge00.StartSlotId, edge01.StartSlotId);
            Assert.AreEqual(edge00.EndSlotId, edge01.EndSlotId);
        }
Ejemplo n.º 2
0
        public void TestSerializeNullException()
        {
            IStorage storage = null;
            GraphController graphController = new GraphController(null);
            EdgeController edgeController = new EdgeController(graphController);
            IVisualEdge edge = new VisualEdge(edgeController, 0x30000001, 0x30000002, false);

            Assert.Throws<ArgumentNullException>(() =>
            {
                edge.Serialize(storage);
            });
        }