예제 #1
0
        public void Test_Parse_And_Generate_Javascript()
        {
            var serviceModel  = FicklefileParserTests.GetTestServiceModel();
            var codeGenerator = ServiceModelCodeGenerator.GetCodeGenerator("javascript", Console.Out, CodeGenerationOptions.Default);

            codeGenerator.Generate(serviceModel);
        }
예제 #2
0
        public void Test_Parse_And_Generate_ObjectiveC()
        {
            var serviceModel = FicklefileParserTests.GetTestServiceModel();

            var codeGenerator = ServiceModelCodeGenerator.GetCodeGenerator("objc", TextWriter.Null, CodeGenerationOptions.Default);

            codeGenerator.Generate(serviceModel);
        }
예제 #3
0
        public void Test_Generate_Objective_To_Console()
        {
            var options = new CodeGenerationOptions
            {
                GenerateClasses = false,
                TypeNamePrefix  = "TN"
            };

            var serviceModel = FicklefileParserTests.GetTestServiceModel();
            var serviceModelcodeGenerator = ServiceModelCodeGenerator.GetCodeGenerator("objc", TextWriter.Null, options);

            serviceModelcodeGenerator.Generate(serviceModel);
        }
예제 #4
0
        public void Test_Generate_CSharp_To_Console()
        {
            var options = new CodeGenerationOptions
            {
                GenerateClasses = true,
                Namespace       = "Io.Fickle.Test.Servicemodel"
            };

            var serviceModel = FicklefileParserTests.GetTestServiceModel();
            var serviceModelcodeGenerator = ServiceModelCodeGenerator.GetCodeGenerator("csharp", TextWriter.Null, options);

            serviceModelcodeGenerator.Generate(serviceModel);
        }
예제 #5
0
        public void Test_Generate_Java_To_Console()
        {
            var options = new CodeGenerationOptions
            {
                GenerateClasses = false,
                TypeNamePrefix  = "TN",
                Namespace       = "io.fickle.test.servicemodel"
            };

            var serviceModel = FicklefileParserTests.GetTestServiceModel();
            var serviceModelcodeGenerator = ServiceModelCodeGenerator.GetCodeGenerator("java", TextWriter.Null, options);

            serviceModelcodeGenerator.Generate(serviceModel);
        }
예제 #6
0
        public void Test_Generate_CSharp_Files()
        {
            var options = new CodeGenerationOptions
            {
                GenerateClasses = true,
                Namespace       = "Io.Fickle.Test.Servicemodel"
            };

            var outputDir    = FileSystemManager.Default.ResolveDirectory("./" + new StackTrace().GetFrame(0).GetMethod().Name);
            var serviceModel = FicklefileParserTests.GetTestServiceModel();

            outputDir.Create(true);

            var serviceModelcodeGenerator = ServiceModelCodeGenerator.GetCodeGenerator("csharp", outputDir, options);

            serviceModelcodeGenerator.Generate(serviceModel);
        }
예제 #7
0
        public void Test_Generate_Javascript_Files()
        {
            var options = new CodeGenerationOptions
            {
                GenerateClasses = false,
                TypeNamePrefix  = "TN"
            };

            var outputDir    = FileSystemManager.Default.ResolveDirectory("./" + new StackTrace().GetFrame(0).GetMethod().Name);
            var serviceModel = FicklefileParserTests.GetTestServiceModel();

            outputDir.Create(true);

            var serviceModelcodeGenerator = ServiceModelCodeGenerator.GetCodeGenerator("javascript", outputDir, options);

            serviceModelcodeGenerator.Generate(serviceModel);
        }
예제 #8
0
        public void Test_Generate_CSharp_Files_With_Mapped_Type_Assembly()
        {
            var options = new CodeGenerationOptions
            {
                GenerateClasses      = false,
                GenerateEnums        = false,
                Namespace            = "Io.Fickle.Test.Servicemodel",
                MappedTypeAssemblies = new [] { typeof(Person).Assembly.Location }
            };

            var outputDir    = FileSystemManager.Default.ResolveDirectory("./" + new StackTrace().GetFrame(0).GetMethod().Name);
            var serviceModel = FicklefileParserTests.GetTestServiceModel();

            outputDir.Create(true);

            var serviceModelcodeGenerator = ServiceModelCodeGenerator.GetCodeGenerator("csharp", outputDir, options);

            serviceModelcodeGenerator.Generate(serviceModel);
        }