Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/11/09 13:35:32 (16 years ago)
Author:
epitzer
Message:

Better type name parser. Replace reflection based type name generation, better exceptions during deserialization. (#613)

File:
1 edited

Legend:

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

    r1776 r1779  
    525525    [TestMethod]
    526526    public void TestTypeStringConversion() {
    527       string version = TypeStringBuilder.StripVersion(typeof(List<int>[]).AssemblyQualifiedName);
    528       Assert.AreEqual(version, typeof(List<int>[]).VersionInvariantName());
     527      string name = typeof(List<int>[]).AssemblyQualifiedName;
     528      string shortName =
     529        "System.Collections.Generic.List`1[[System.Int32, mscorlib]][], mscorlib";
     530      Assert.AreEqual(name, TypeNameParser.Parse(name).ToString());       
     531      Assert.AreEqual(shortName, TypeNameParser.Parse(name).ToString(false));
     532      Assert.AreEqual(shortName, typeof(List<int>[]).VersionInvariantName());
    529533    }
    530534
Note: See TracChangeset for help on using the changeset viewer.