Beispiel #1
0
        void GenerateMockConfiguration()
        {
            var generator = new MockConfigurationClassGenerator(Context.ControllerType);

            Console.Write($"Adding class {Context.ControllerName}MockConfiguration");
            MockFolder.GetFile($"{Context.ControllerName}MockConfiguration.cs").WriteAllText(generator.Generate());
            Console.WriteLine("Done");
        }
Beispiel #2
0
        protected override void AddFiles()
        {
            Console.Write("Adding the proxy class...");
            Folder.GetFile($"{Context.ControllerName}.cs").WriteAllText(ProxyClassProgrammer.Generate());
            Console.WriteLine("Done");
            Console.Write("Adding the proxy class mock configuration...");
            MockFolder.GetFile($"{Context.ControllerName}.Mock.cs").WriteAllText(ProxyClassProgrammer.GenerateMock());
            Console.WriteLine("Done");
            Console.Write("Adding ReamMe.txt file ...");
            Folder.GetFile("README.txt").WriteAllText(ReadmeFileGenerator.Generate());
            Console.WriteLine("Done");

            GenerateEnums();
            GenerateDtoClasses();
            GenerateDataProviderClasses();
            GenerateMockConfiguration();
        }