Exemplo n.º 1
0
        public void TestRegionSerialisation()
        {
            Net.Network.Network n = new Net.Network.Network("network", Parameters.Empty());
            Region r = new Region("myRegion", n);

            IPersistenceAPI pa = Persistence.Get(new SerialConfig(null, SerialConfig.SERIAL_TEST_DIR));

            byte[] bytes = pa.Serializer().Serialize(r);
            Region r2    = pa.Serializer().Deserialize <Region>(bytes);

            Assert.AreEqual(r, r2);
        }