Changeset 1795 for trunk/sources/HeuristicLab.Persistence/UnitTests
- Timestamp:
- 05/14/09 13:00:36 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/UnitTests/UseCases.cs
r1780 r1795 550 550 IntWrapper newI = (IntWrapper)d.Deserialize(p); 551 551 Assert.AreEqual(i.Value, newI.Value); 552 552 553 string newTypeString = Regex.Replace(typeString.ToString(), 553 "Version= (\\d+\\.\\d+\\.\\d+\\.\\d+)",554 "Version= 9999.9999.9999.9999");554 "Version=\\d+\\.\\d+\\.\\d+\\.\\d+", 555 "Version=0.0.9999.9999"); 555 556 try { 556 557 d = new Deserializer(XmlParser.ParseTypeCache(new StringReader(newTypeString))); 557 558 Assert.Fail("Exception expected"); 558 } catch (PersistenceException) { 559 // EXPECTED 559 } catch (PersistenceException x) { 560 Assert.IsTrue(x.Message.Contains("incompatible")); 561 } 562 newTypeString = Regex.Replace(typeString.ToString(), 563 "Version=(\\d+\\.\\d+)\\.\\d+\\.\\d+", 564 "Version=$1.9999.9999"); 565 try { 566 d = new Deserializer(XmlParser.ParseTypeCache(new StringReader(newTypeString))); 567 Assert.Fail("Exception expected"); 568 } catch (PersistenceException x) { 569 Assert.IsTrue(x.Message.Contains("newer")); 560 570 } 561 571 }
Note: See TracChangeset
for help on using the changeset viewer.