Exemple #1
0
        public void GenerateClientClass(IEnumerable <string> apiClassNames, string expected)
        {
            var generatedClientClass = CSharpClientGenerator.GenerateClientClass(apiClassNames);

            Console.WriteLine(generatedClientClass);

            Assert.That(generatedClientClass, Is.EqualTo(expected));
        }
        public static void Execute(string inputFolder)
        {
            var apiNames = CSharpApiClassesRetriever.GetNames(inputFolder).ToList();

            Console.WriteLine($"Retrieved {string.Join(", ", apiNames)}");
            var generatedClass = CSharpClientGenerator.GenerateClientClass(apiNames);

            CSharpApiClassWriter.Write(Path.Combine(inputFolder, "Client.cs"), generatedClass);
            Console.WriteLine("Generated Client class");
        }