コード例 #1
0
        public void TestDeveloperModeNodeJsDebuggingPortUsage()
        {
            uint port = 1234;
            DefaultAppiumAppSettings settings = new DefaultAppiumAppSettings();

            settings.UseDeveloperMode   = true;
            settings.UseNodeJSDebugging = true;
            settings.NodeJSDebugPort    = port;

            AppiumServerRunnerMock setup = new AppiumServerRunnerMock(NODE_RUNNER, WORKING_DIR, settings);

            Assert.That(setup.ContainsArgument <NodeJSDebugArgument>(), Is.True);
            Assert.That(setup.GetArgumentForTest <NodeJSDebugArgument>().Value, Is.EqualTo(port));

            // reset for negative case
            settings.UseNodeJSDebugging = false;
            setup.Setup(settings);
            Assert.That(setup.ContainsArgument <NodeJSDebugArgument>(), Is.False);
        }
コード例 #2
0
        public void TestAndroidWaitActivityUsage()
        {
            string test = "wait";
            DefaultAppiumAppSettings settings = new DefaultAppiumAppSettings();

            settings.AndroidWaitActivity = test;

            AppiumServerRunnerMock setup = new AppiumServerRunnerMock(NODE_RUNNER, WORKING_DIR, settings);

            // activity not enabled by default
            Assert.That(setup.ContainsArgument <AndroidWaitActivityArgument>(), Is.False);

            // activity enabled
            settings.UseAndroidWaitActivity = true;
            setup.Setup(settings);

            Assert.That(setup.ContainsArgument <AndroidWaitActivityArgument>(), Is.True);
            Assert.That(setup.GetArgumentForTest <AndroidWaitActivityArgument>().Value, Is.EqualTo(test));
        }
コード例 #3
0
        public void TestAndroidDeviceReadyTimeoutUsage()
        {
            uint test = 1234;
            DefaultAppiumAppSettings settings = new DefaultAppiumAppSettings();

            settings.AndroidDeviceReadyTimeout = test;

            AppiumServerRunnerMock setup = new AppiumServerRunnerMock(NODE_RUNNER, WORKING_DIR, settings);

            // timeout not enabled by default
            Assert.That(setup.ContainsArgument <AndroidDeviceReadyTimeoutArgument>(), Is.False);

            // timeout enabled
            settings.UseAndroidDeviceReadyTimeout = true;
            setup.Setup(settings);

            Assert.That(setup.ContainsArgument <AndroidDeviceReadyTimeoutArgument>(), Is.True);
            Assert.That(setup.GetArgumentForTest <AndroidDeviceReadyTimeoutArgument>().Value, Is.EqualTo(test));
        }
コード例 #4
0
        public void TestLaunchAVDUsage()
        {
            string test = "AVD";
            DefaultAppiumAppSettings settings = new DefaultAppiumAppSettings();

            settings.AVDToLaunch = test;

            AppiumServerRunnerMock setup = new AppiumServerRunnerMock(NODE_RUNNER, WORKING_DIR, settings);

            // avd not enabled by default
            Assert.That(setup.ContainsArgument <AVDToLaunchArgument>(), Is.False);

            // avd enabled
            settings.LaunchAVD = true;
            setup.Setup(settings);

            Assert.That(setup.ContainsArgument <AVDToLaunchArgument>(), Is.True);
            Assert.That(setup.GetArgumentForTest <AVDToLaunchArgument>().Value, Is.EqualTo(test));
        }
		public void TestDeveloperModeNodeJsDebuggingPortUsage()
		{
			uint port = 1234;
			DefaultAppiumAppSettings settings = new DefaultAppiumAppSettings();
			settings.UseDeveloperMode = true;
			settings.UseNodeJSDebugging = true;
			settings.NodeJSDebugPort = port;

			AppiumServerRunnerMock setup = new AppiumServerRunnerMock(NODE_RUNNER, WORKING_DIR, settings);

			Assert.That(setup.ContainsArgument<NodeJSDebugArgument>(), Is.True);
			Assert.That(setup.GetArgumentForTest<NodeJSDebugArgument>().Value, Is.EqualTo(port));

			// reset for negative case
			settings.UseNodeJSDebugging = false;
			setup.Setup(settings);
			Assert.That(setup.ContainsArgument<NodeJSDebugArgument>(), Is.False);
		}
		public void TestAndroidDeviceReadyTimeoutUsage()
		{
			uint test = 1234;
			DefaultAppiumAppSettings settings = new DefaultAppiumAppSettings();
			settings.AndroidDeviceReadyTimeout = test;

			AppiumServerRunnerMock setup = new AppiumServerRunnerMock(NODE_RUNNER, WORKING_DIR, settings);

			// timeout not enabled by default
			Assert.That(setup.ContainsArgument<AndroidDeviceReadyTimeoutArgument>(), Is.False);

			// timeout enabled
			settings.UseAndroidDeviceReadyTimeout = true;
			setup.Setup(settings);

			Assert.That(setup.ContainsArgument<AndroidDeviceReadyTimeoutArgument>(), Is.True);
			Assert.That(setup.GetArgumentForTest<AndroidDeviceReadyTimeoutArgument>().Value, Is.EqualTo(test));
		}
		public void TestAndroidWaitActivityUsage()
		{
			string test = "wait";
			DefaultAppiumAppSettings settings = new DefaultAppiumAppSettings();
			settings.AndroidWaitActivity = test;

			AppiumServerRunnerMock setup = new AppiumServerRunnerMock(NODE_RUNNER, WORKING_DIR, settings);

			// activity not enabled by default
			Assert.That(setup.ContainsArgument<AndroidWaitActivityArgument>(), Is.False);

			// activity enabled
			settings.UseAndroidWaitActivity = true;
			setup.Setup(settings);

			Assert.That(setup.ContainsArgument<AndroidWaitActivityArgument>(), Is.True);
			Assert.That(setup.GetArgumentForTest<AndroidWaitActivityArgument>().Value, Is.EqualTo(test));
		}
		public void TestLaunchAVDUsage()
		{
			string test = "AVD";
			DefaultAppiumAppSettings settings = new DefaultAppiumAppSettings();
			settings.AVDToLaunch = test;

			AppiumServerRunnerMock setup = new AppiumServerRunnerMock(NODE_RUNNER, WORKING_DIR, settings);

			// avd not enabled by default
			Assert.That(setup.ContainsArgument<AVDToLaunchArgument>(), Is.False);

			// avd enabled
			settings.LaunchAVD = true;
			setup.Setup(settings);

			Assert.That(setup.ContainsArgument<AVDToLaunchArgument>(), Is.True);
			Assert.That(setup.GetArgumentForTest<AVDToLaunchArgument>().Value, Is.EqualTo(test));
		}