Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/10/10 16:37:52 (15 years ago)
Author:
epitzer
Message:

add justifications for rejecting a type for serialization in ICompositeSerializer (#548)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Tests/UseCases.cs

    r2990 r2993  
    736736    }
    737737
     738    [TestMethod]
     739    public void TestRejectionJustifications() {
     740      NonSerializable ns = new NonSerializable();
     741      try {
     742        XmlGenerator.Serialize(ns, tempFile);
     743        Assert.Fail("PersistenceException expected");
     744      } catch (PersistenceException x) {
     745        Assert.IsTrue(x.Message.Contains(new StorableSerializer().JustifyRejection(typeof(NonSerializable))));       
     746      }
     747    }
     748
    738749    [ClassInitialize]
    739750    public static void Initialize(TestContext testContext) {
Note: See TracChangeset for help on using the changeset viewer.