Exemplo n.º 1
0
        //[TestCase(20792)]
        public void TestAdbCommand(int processId)
        {
            var process = Process.GetProcessById(processId);

            Assert.IsNotNull(process, $"Process must be running.");

            var emulatorService = new EmulatorService();

            // load emulator data to service
            emulatorService.GetTableWindowHandle(process);

            var outputs = emulatorService.ExecuteAdbCommand(process,
                                                            "shell",
                                                            "\"cat /data/data/com.ylc.qp.Pokermate/shared_prefs/Cocos2dxPrefsFile.xml\"");

            Assert.Multiple(() =>
            {
                foreach (var output in outputs)
                {
                    var result = PKLoginResponse.TryParse(output, out PKLoginResponse loginResponse);
                    Assert.IsTrue(result);
                }
            });
        }