Definition at line 24 of file BinarySerializeTests.cs.
static void Deveel.Data.Serialization.BinarySerializeTests.SerializeImplicit |
( |
| ) |
|
|
inlinestatic |
Definition at line 78 of file BinarySerializeTests.cs.
79 var obj =
new TestClass2(
"test2");
81 var serializer =
new BinarySerializer();
84 using (var memoryStream =
new MemoryStream()) {
85 serializer.Serialize(memoryStream, obj);
87 bytes = memoryStream.ToArray();
91 using (var memoryStream =
new MemoryStream(bytes)) {
92 graph = serializer.Deserialize(memoryStream, typeof(TestClass2));
95 Assert.IsNotNull(graph);
96 Assert.IsInstanceOf<TestClass2>(obj);
98 obj = (TestClass2) graph;
99 Assert.AreEqual(
"test2", obj.Value);
100 Assert.IsNull(obj.Parent);
static void Deveel.Data.Serialization.BinarySerializeTests.SerializeObjectNameWithNoParent |
( |
| ) |
|
|
inlinestatic |
Definition at line 52 of file BinarySerializeTests.cs.
55 var serializer =
new BinarySerializer();
58 using (var memoryStream =
new MemoryStream()) {
59 serializer.Serialize(memoryStream, objName);
61 bytes = memoryStream.ToArray();
65 using (var memoryStream =
new MemoryStream(bytes)) {
66 graph = serializer.Deserialize(memoryStream, typeof(
ObjectName));
69 Assert.IsNotNull(graph);
73 Assert.AreEqual(objName.Name, objName2.Name);
74 Assert.AreEqual(objName, objName2);
Describes the name of an object within a database.
static void Deveel.Data.Serialization.BinarySerializeTests.SerializeWithNoParent |
( |
| ) |
|
|
inlinestatic |
Definition at line 26 of file BinarySerializeTests.cs.
27 var obj =
new TestClass {Value =
"test1"};
29 var serializer =
new BinarySerializer();
32 using (var memoryStream =
new MemoryStream()) {
33 serializer.Serialize(memoryStream, obj);
35 bytes = memoryStream.ToArray();
39 using (var memoryStream =
new MemoryStream(bytes)) {
40 graph = serializer.Deserialize(memoryStream, typeof(TestClass));
43 Assert.IsNotNull(graph);
44 Assert.IsInstanceOf<TestClass>(obj);
46 obj = (TestClass) graph;
47 Assert.AreEqual(
"test1", obj.Value);
48 Assert.IsNull(obj.Parent);
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb-nunit/Deveel.Data.Serialization/BinarySerializeTests.cs