예제 #1
0
        public void Cant_create_if_directory_already_exist()
        {
            Directories.CreateIfNotExists(_tempDir / "StackOverflow");

            var m = Maker.For(_tempDir);

            Should.Throw <MakeException>(() => m.New("StackOverflow"));
        }
예제 #2
0
파일: NewMakerTest.cs 프로젝트: joaofx/Miru
        public void Make_new_solution()
        {
            var m = Maker.For(_tempDir, "StackOverflow");

            m.New("StackOverflow");

            // check some main files
            File.Exists(_tempDir / "StackOverflow" / ".gitignore").ShouldBeTrue();

            File.ReadAllText(_tempDir / "StackOverflow" / "config" / "Config.Development.yml").ShouldContain("{{ db_dir }}StackOverflow_dev");
        }
예제 #3
0
        public void Can_create_a_maker()
        {
            var m = Maker.For(A.TempPath("Projects"), "Mong");

            m.Solution.Name.ShouldBe("Mong");
            m.Solution.RootDir.ShouldBe(A.TempPath("Projects", "Mong"));

            var m2 = Maker.For(A.TempPath("Mong"), "Mong");

            m2.Solution.Name.ShouldBe("Mong");
            m2.Solution.RootDir.ShouldBe(A.TempPath("Mong"));
        }
예제 #4
0
        public void Make_new_solution()
        {
            var m = Maker.For(_tempDir, "StackOverflow");

            m.New("StackOverflow");

            // check some main files
            File.Exists(_tempDir / "StackOverflow" / ".gitignore").ShouldBeTrue();

            // config
            (m.Solution.AppDir / "appSettings-example.yml").ShouldContain("{{ db_dir }}App_dev");
            (m.Solution.AppDir / "appSettings.Development.yml").ShouldContain("{{ db_dir }}App_dev");
            (m.Solution.AppDir / "appSettings.Test.yml").ShouldContain("{{ db_dir }}App_dev");
        }
예제 #5
0
        public void Setup()
        {
            _tempDir = A.TempPath("Miru", "SolutionFinderTest");

            Directories.DeleteIfExists(_tempDir);

            var maker = Maker.For(_tempDir, "Shoppers");

            maker.New("Shoppers");

            _solutionDir = _tempDir / "Shoppers";

            _solution = _solutionFinder.FromDir(_solutionDir).Solution;
        }
예제 #6
0
        public void Make_new_solution_named_with_dots()
        {
            var m = Maker.For(_tempDir, "StackExchange.StackOverflow");

            m.New("StackExchange.StackOverflow");

            (m.Solution.RootDir / ".gitignore").ShouldExist();

            (m.Solution.RootDir / "StackExchange.StackOverflow.sln")
            .ShouldContain(@"""StackExchange.StackOverflow"", ""src\StackExchange.StackOverflow\StackExchange.StackOverflow.csproj""");

            // config
            (m.Solution.AppDir / "appSettings-example.yml").ShouldContain("{{ db_dir }}App_dev");
            (m.Solution.AppDir / "appSettings.Development.yml").ShouldContain("{{ db_dir }}App_dev");
            (m.Solution.AppDir / "appSettings.Test.yml").ShouldContain("{{ db_dir }}App_dev");

            // app
            (m.Solution.AppDir / "Database" / "StackOverflowDbContext.cs").ShouldContain("public class StackOverflowDbContext");

            // test
            (m.Solution.AppTestsDir / "StackOverflowFabricator.cs").ShouldContain("public class StackOverflowFabricator");
        }