protected string GetScriptText()
        {
            ControllerBuilder.Commit();

            // Kind of annoying... but eh
            WorkspaceBuilder.ProcessorSettings.NamingStrategy = NamingStrategy.Create(ConfigOptions.NameCasingConverter);

            var packageTester = WorkspaceBuilder.GetPackageTester();
            var context       = CreateContext(packageTester);

            var    templateFactory = new ScriptTemplateFactory(ConfigOptions);
            string scriptText      = templateFactory.CreateControllerTextTemplate(context).GetText();

            return(scriptText);
        }
示例#2
0
        private void AssertScriptTextIs(string expected)
        {
            var packageTester = WorkspaceBuilder.GetPackageTester();

            packageTester.AssertScriptText(expected);
        }
示例#3
0
        protected ReferenceTypeTester AssertThatTheReferenceTypeWithName(string name, int?typeArgCnt = null)
        {
            var packageTester = WorkspaceBuilder.GetPackageTester();

            return(packageTester.TestReferenceTypeWithName(name, typeArgCnt));
        }
示例#4
0
        protected EnumTester AssertThatTheDefaultEnumType()
        {
            var packageTester = WorkspaceBuilder.GetPackageTester();

            return(packageTester.TestEnumWithName(TestTypeName));
        }
 private TypeCollectionTester CreateTester()
 {
     ControllerBuilder.Commit();
     return(WorkspaceBuilder.GetPackageTester());
 }