Nested inner classes get incorrect module name

Issue #128 resolved
Jan Verhaeghe
created an issue

Consider the following structure:

namespace TypeLite.Tests.TestModels
{
    public class Outer //Feature
    {
        public class Inner //Response
        {
            public class SecondLevelInner //Dto
            {
            }
        }
    }
}

The following test fails:

        [Fact]
        public void WhenInitializedWithSecondLevelInnerClass_ModuleIsSetToNamespaceAndAllOuterClasses()
        {
            var target = new TsClass(typeof(TypeLite.Tests.TestModels.Outer.Inner.SecondLevelInner));

            Assert.NotNull(target.Module);
            Assert.Equal(typeof(TypeLite.Tests.TestModels.Outer.Inner).Namespace + ".Outer.Inner", target.Module.Name);
        }

See also #46

Comments (3)

  1. Log in to comment