public static void Run(AbsoluteDirectoryPath root, FuseRunner fuseRunner)
        {
            var exitCode = fuseRunner.Run("install -s android", Optional.None())
                           .WaitOrThrow(TimeSpan.FromMinutes(1))
                           .ExitCode;
            const int isInstalled     = 0;
            const int isNotInstalled  = 100;
            const int updateAvailable = 200;

            if (exitCode != isInstalled && exitCode != isNotInstalled && exitCode != updateAvailable)
            {
                throw new TestFailure("Unexpected exit code " + exitCode);
            }
        }
Example #2
0
        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"));
            }
        }
Example #3
0
        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");
        }
Example #4
0
        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"));
            }
        }