Changeset 1653
- Timestamp:
- 04/24/09 14:03:47 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/UnitTests/UseCases.cs
r1652 r1653 149 149 r.uninitialized = null; 150 150 XmlGenerator.Serialize(r, tempFile); 151 object o =XmlParser.DeSerialize(tempFile);151 Root newR = (Root)XmlParser.DeSerialize(tempFile); 152 152 Assert.AreEqual( 153 153 DebugStringGenerator.Serialize(r), 154 DebugStringGenerator.Serialize(o)); 155 Root newR = (Root)o; 154 DebugStringGenerator.Serialize(newR)); 156 155 Assert.AreSame(newR, newR.selfReferences[0]); 157 156 Assert.AreNotSame(r, newR); … … 160 159 Assert.AreEqual(r.i[1], 5); 161 160 Assert.AreEqual(r.i[2], 6); 162 Assert.Are Same(r.s, "new value");161 Assert.AreEqual(r.s, "new value"); 163 162 Assert.AreEqual(r.intArray[0], 3); 164 163 Assert.AreEqual(r.intArray[1], 2); … … 175 174 Assert.IsFalse(r.boolean); 176 175 Assert.IsTrue((DateTime.Now - r.dateTime).TotalSeconds < 10); 177 Assert.Are Same(r.kvp.Key, "string key");176 Assert.AreEqual(r.kvp.Key, "string key"); 178 177 Assert.AreEqual(r.kvp.Value, 321); 179 178 Assert.IsNull(r.uninitialized); 179 Assert.AreEqual(newR.myEnum, TestEnum.va1); 180 Assert.AreEqual(newR.i[0], 7); 181 Assert.AreEqual(newR.i[1], 5); 182 Assert.AreEqual(newR.i[2], 6); 183 Assert.AreEqual(newR.s, "new value"); 184 Assert.AreEqual(newR.intArray[0], 3); 185 Assert.AreEqual(newR.intArray[1], 2); 186 Assert.AreEqual(newR.intArray[2], 1); 187 Assert.AreEqual(newR.intList[0], 9); 188 Assert.AreEqual(newR.intList[1], 8); 189 Assert.AreEqual(newR.intList[2], 7); 190 Assert.AreEqual(newR.multiDimArray[0, 0], 5); 191 Assert.AreEqual(newR.multiDimArray[0, 1], 4); 192 Assert.AreEqual(newR.multiDimArray[0, 2], 3); 193 Assert.AreEqual(newR.multiDimArray[1, 0], 1); 194 Assert.AreEqual(newR.multiDimArray[1, 1], 4); 195 Assert.AreEqual(newR.multiDimArray[1, 2], 6); 196 Assert.IsFalse(newR.boolean); 197 Assert.IsTrue((DateTime.Now - newR.dateTime).TotalSeconds < 10); 198 Assert.AreEqual(newR.kvp.Key, "string key"); 199 Assert.AreEqual(newR.kvp.Value, 321); 200 Assert.IsNull(newR.uninitialized); 180 201 } 181 202
Note: See TracChangeset
for help on using the changeset viewer.