Esempio n. 1
0
 public void FixUpClassDefaultApplicationBaseTypeTest()
 {
     Utils.RunInSeparateAppDomain(() => {
         var baseTypeField = typeof(PageParser).GetField("s_defaultApplicationBaseType", BindingFlags.Static | BindingFlags.NonPublic);
         baseTypeField.SetValue(null, typeof(WebPageHttpApplication));
         var pageType = new WebPageSurrogateControlBuilderTest().FixUpClassTest(type =>
                                                                                WebPageSurrogateControlBuilder.FixUpClass(type, Language.CSharp));
         var properties = pageType.Members.OfType <CodeMemberProperty>().ToList();
         var prop       = properties[0];
         Assert.AreEqual(typeof(WebPageHttpApplication).FullName, prop.Type.BaseType);
     });
 }
 public void FixUpClassDefaultApplicationBaseTypeTest() {
     Utils.RunInSeparateAppDomain(() => {
         var baseTypeField = typeof(PageParser).GetField("s_defaultApplicationBaseType", BindingFlags.Static | BindingFlags.NonPublic);
         baseTypeField.SetValue(null, typeof(WebPageHttpApplication));
         var pageType = new WebPageSurrogateControlBuilderTest().FixUpClassTest(type =>
             WebPageSurrogateControlBuilder.FixUpClass(type, Language.CSharp));
         var properties = pageType.Members.OfType<CodeMemberProperty>().ToList();
         var prop = properties[0];
         Assert.AreEqual(typeof(WebPageHttpApplication).FullName, prop.Type.BaseType);
     });
 }