Example #1
0
        private void Declare()
        {
            CronusMax       = new Output.CronusPlus.Write(this);
            Gamepad         = new Output.Gamepad(this);
            Gimx            = new Output.Gimx.Gimx(this);
            GimxRemote      = new Output.Gimx.GimxRemote(this);
            Keyboard        = new Input.KeyboardHook(this);
            Keymap          = new Keymap(this);
            Menu            = new Menu.ShowMenu(this);
            Mouse           = new Input.Mouse.Hook(this);
            Remap           = new Remapping();
            System          = new Configuration(this);
            VideoResolution = new VideoResolution(this);

            //Fix these later
            KeyboardInterface = new Input.KeyboardInterface(Home);
            KeyboardInterface.getSystemHandle(System);
            KeyboardInterface.getRemapHangle(Remap);
            KeyboardInterface.getKeymapHandle(Keymap);


            TitanOne = new Output.TitanOne.Write(Home, System, Gamepad);
            External = new ExternalScript(Home);


            VideoCapture = new VideoCapture.VideoCapture(Home, System);

            System.GetClassHandles(VideoCapture, CronusMax, TitanOne, VideoResolution);
        }
Example #2
0
        public void ShouldInitializeScriptFile()
        {
            string         fileName       = "MockFileName";
            FileSystemInfo fileSystemInfo = new MockFileSystemInfo(fileName);

            ExternalScript externalScript = new ExternalScript(fileSystemInfo, new PowershellTranslator());

            FileSystemInfo expected = fileSystemInfo;
            FileSystemInfo actual   = externalScript.ScriptFile;

            Assert.Equal(expected, actual);
        }
Example #3
0
        public void ShouldInitializeTranslator()
        {
            string                fileName       = "MockFileName";
            FileSystemInfo        fileSystemInfo = new MockFileSystemInfo(fileName);
            IPowershellTranslator translator     = new PowershellTranslator();

            ExternalScript externalScript = new ExternalScript(fileSystemInfo, translator);

            IPowershellTranslator expected = translator;
            IPowershellTranslator actual   = externalScript.Translator;

            Assert.Equal(expected, actual);
        }
Example #4
0
        public async Task ShouldCopyFromCorrectSource()
        {
            string                fileName   = @"C:\MockFileName.ps1";
            IOptions              options    = new Options();
            MockFileSystemInfo    fileInfo   = new MockFileSystemInfo(fileName);
            IPowershellTranslator translator = new PowershellTranslator();

            string sourcePath = string.Empty;

            ExternalScript externalScript = new ExternalScript(fileInfo, translator, (source, destination, token) =>
            {
                sourcePath = source;
                return(Task.CompletedTask);
            });

            await externalScript.Process(options);

            string expected = fileName;
            string actual   = sourcePath;

            Assert.Equal(expected, actual);
        }
Example #5
0
        public async Task ShouldCopyToCorrectDestination()
        {
            string                fileName   = @"C:\MockFileName.ps1";
            IOptions              options    = new Options();
            MockFileSystemInfo    fileInfo   = new MockFileSystemInfo(fileName);
            IPowershellTranslator translator = new PowershellTranslator();

            string destinationPath = string.Empty;

            ExternalScript externalScript = new ExternalScript(fileInfo, translator, (source, destination, token) =>
            {
                destinationPath = destination;

                return(Task.CompletedTask);
            });

            await externalScript.Process(options);

            string expected = Path.Combine(options.RootFilesDirectoryLocation, Path.GetFileName(externalScript.ScriptFile.Name));
            string actual   = destinationPath;

            Assert.Equal(expected, actual);
        }
Example #6
0
        private void Declare()
        {
            ControllerMax = new Output.ControllerMax(this);
            Gamepad = new Output.Gamepad(this);
            Gimx = new Gimx(this);
            Keyboard = new Input.KeyboardHook(this);
            Keymap = new Keymap(this);
            Menu = new Menu.ShowMenu(this);
            Mouse = new Input.Mouse.Hook(this);
            Remap = new Remapping();
            System = new Configuration(this);
            VideoResolution = new VideoResolution(this);

            //Fix these later
            KeyboardInterface = new Input.KeyboardInterface(Home);
            KeyboardInterface.getSystemHandle(System);
            KeyboardInterface.getRemapHangle(Remap);
            KeyboardInterface.getKeymapHandle(Keymap);

            TitanOne = new Output.TitanOne.Write(Home, System, Gamepad);
            External = new ExternalScript(Home);

            VideoCapture = new VideoCapture.VideoCapture(Home, System);

            System.GetClassHandles(VideoCapture, ControllerMax, TitanOne, VideoResolution);
        }
Example #7
0
 public void SetUp()
 {
     _tag = new ExternalScript(_url);
 }