Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 8
0
        public void Test_Generate_Objective_Files2()
        {
            var options = new CodeGenerationOptions
            {
                GenerateClasses         = true,
                TypeNamePrefix          = "TN",
                SerializeEnumsAsStrings = false
            };

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

            outputDir.Create(true);

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

            serviceModelcodeGenerator.Generate(serviceModel);
        }
Ejemplo n.º 9
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);
        }