コード例 #1
0
ファイル: FuseBuild.cs プロジェクト: yongaru/fuse-studio
        public static void Run(AbsoluteDirectoryPath root, FuseRunner fuseRunner)
        {
            var shell      = new Shell();
            var projectDir = root / "GeneratedTestData" / "FuseBuild";
            var project    = projectDir / new FileName("SystemTest1.unoproj");

            Console.WriteLine("Setting up project");
            IOHelpers.DeleteAndCopyDirectory(root / "Projects" / "SystemTest1", projectDir);


            Console.WriteLine("Starting build");
            fuseRunner.Run("build " + project.NativePath, Optional.None())
            .WaitOrThrow(TimeSpan.FromMinutes(3))
            .AssertExitCode(0);
            IOHelpers.AssertExists(shell, projectDir / "build");
        }
コード例 #2
0
ファイル: FuseCreate.cs プロジェクト: yongaru/fuse-studio
        public static void Run(AbsoluteDirectoryPath root, FuseRunner fuseRunner)
        {
            var shell   = new Shell();
            var testDir = root / "GeneratedTestData" / "FuseCreate";
            var appDir  = testDir / "appname";

            shell.DeleteIfExistsAndCreateDirectory(testDir);
            using (TestHelpers.ChangeWorkingDirectory(testDir))
            {
                fuseRunner.Run("create app appname", Optional.None())
                .WaitOrThrow(TimeSpan.FromSeconds(10))
                .AssertExitCode(0);
                IOHelpers.AssertExists(shell, appDir / new FileName("MainView.ux"));
                IOHelpers.AssertExists(shell, appDir / new FileName("appname.unoproj"));
            }
        }
コード例 #3
0
ファイル: FuseImport.cs プロジェクト: yongaru/fuse-studio
        public static void Run(AbsoluteDirectoryPath root, FuseRunner fuseRunner)
        {
            var shell      = new Shell();
            var projectDir = root / "GeneratedTestData" / "FuseImport";

            Console.WriteLine("Setting up project");
            IOHelpers.DeleteAndCopyDirectory(root / "Projects" / "SketchImportApp", projectDir);

            Console.WriteLine("Starting import");
            using (TestHelpers.ChangeWorkingDirectory(projectDir))
            {
                fuseRunner.Run("import Foo.sketch", Optional.None())
                .WaitOrThrow(TimeSpan.FromMinutes(1))
                .AssertExitCode(0);
                IOHelpers.AssertExists(shell, projectDir / "SketchSymbols" / new FileName("Sketch.Fuse.ux"));
            }
        }