Commit 7428bdfd authored by Namrata Kedia's avatar Namrata Kedia
Browse files

IoT API Iteration:2

parent b33be23b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -62,9 +62,7 @@ namespace MockDataGenerator
            new Endpoint(HttpMethods.Get, DevicePortal.DateTimeInfoApi),
            new Endpoint(HttpMethods.Get, DevicePortal.DisplayOrientationApi),
            new Endpoint(HttpMethods.Get, DevicePortal.DeviceNameApi),
            new Endpoint(HttpMethods.Get, DevicePortal.SetTimezoneInfoApi),

            
            new Endpoint(HttpMethods.Get, DevicePortal.DisplayResolutionApi),
        };

        /// <summary>
+5 −5
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests
            Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status);

            // Check some known things about this response.
            Assert.AreEqual("beta2", getTask.Result);
            Assert.AreEqual("myrpi3", getTask.Result);
        }

        /// <summary>
@@ -140,11 +140,11 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests
                this.FriendlyOperatingSystemVersion,
                HttpMethods.Get);

            Task<controllerDriverInfo> getTask = TestHelpers.Portal.GetControllerDriverInfo();
            Task<ControllerDriverInfo> getTask = TestHelpers.Portal.GetControllerDriverInfo();
            getTask.Wait();

            Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status);
            controllerDriverInfo controllerDriver = getTask.Result;
            ControllerDriverInfo controllerDriver = getTask.Result;
            // Check some known things about this response.
            Assert.AreEqual("Inbox Driver", controllerDriver.CurrentDriver);
        }
@@ -168,7 +168,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests
            DateTimeInfo dateTime = getTask.Result;
            // Check some known things about this response.
           
            Assert.AreEqual(22, dateTime.Current.day);
            Assert.AreEqual(22, dateTime.CurrentDateTime.day);
            

        }
@@ -191,7 +191,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests
            TimezoneInfo timezone = getTask.Result;
            // Check some known things about this response.

            Assert.AreEqual("(UTC-06:00) Central Time (US & Canada)", timezone.Current.description);
            Assert.AreEqual("(UTC-06:00) Central Time (US & Canada)", timezone.CurrentTimeZone.description);
            Assert.AreEqual("(UTC-11:00) Coordinated Universal Time-11", timezone.Timezones[1].description);

        }
+1 −1
Original line number Diff line number Diff line
{"Current" : {"Resolution" : "et Display Resolution and Orientation\r\n\r\nCan't read the current display settings\r\nxet Display Resolution and Orientation\r\n\r\nCan't read the current display settings\r\n (et Display Resolution and Orientation\r\n\r\nCan't read the current display settings\r\nHz)"}, "Resolutions" : []}
 No newline at end of file
{"Current" : {"Index" : 46, "Resolution" : "1680x1050 (60Hz)"}, "Resolutions" : [{"Index" : 0, "Resolution" : "640x350 (85Hz)"},{"Index" : 1, "Resolution" : "640x400 (85Hz)"},{"Index" : 2, "Resolution" : "720x400 (85Hz)"},{"Index" : 3, "Resolution" : "640x480 (60Hz)"},{"Index" : 4, "Resolution" : "640x480 (72Hz)"},{"Index" : 5, "Resolution" : "640x480 (75Hz)"},{"Index" : 6, "Resolution" : "640x480 (85Hz)"},{"Index" : 7, "Resolution" : "800x600 (56Hz)"},{"Index" : 8, "Resolution" : "800x600 (60Hz)"},{"Index" : 9, "Resolution" : "800x600 (72Hz)"},{"Index" : 10, "Resolution" : "800x600 (75Hz)"},{"Index" : 11, "Resolution" : "800x600 (85Hz)"},{"Index" : 12, "Resolution" : "800x600 (120Hz)"},{"Index" : 13, "Resolution" : "848x480 (60Hz)"},{"Index" : 14, "Resolution" : "1024x768 (43Hz)"},{"Index" : 15, "Resolution" : "1024x768 (60Hz)"},{"Index" : 16, "Resolution" : "1024x768 (70Hz)"},{"Index" : 17, "Resolution" : "1024x768 (75Hz)"},{"Index" : 18, "Resolution" : "1024x768 (85Hz)"},{"Index" : 19, "Resolution" : "1024x768 (120Hz)"},{"Index" : 20, "Resolution" : "1152x864 (60Hz)"},{"Index" : 21, "Resolution" : "1280x768 (60Hz)"},{"Index" : 22, "Resolution" : "1280x768 (75Hz)"},{"Index" : 23, "Resolution" : "1280x768 (85Hz)"},{"Index" : 24, "Resolution" : "1280x768 (120Hz)"},{"Index" : 25, "Resolution" : "1280x800 (60Hz)"},{"Index" : 26, "Resolution" : "1280x800 (75Hz)"},{"Index" : 27, "Resolution" : "1280x800 (85Hz)"},{"Index" : 28, "Resolution" : "1280x800 (120Hz)"},{"Index" : 29, "Resolution" : "1280x960 (60Hz)"},{"Index" : 30, "Resolution" : "1280x960 (85Hz)"},{"Index" : 31, "Resolution" : "1280x1024 (60Hz)"},{"Index" : 32, "Resolution" : "1280x1024 (75Hz)"},{"Index" : 33, "Resolution" : "1280x1024 (85Hz)"},{"Index" : 34, "Resolution" : "1360x768 (60Hz)"},{"Index" : 35, "Resolution" : "1400x1050 (60Hz)"},{"Index" : 36, "Resolution" : "1400x1050 (75Hz)"},{"Index" : 37, "Resolution" : "1400x1050 (85Hz)"},{"Index" : 38, "Resolution" : "1440x900 (60Hz)"},{"Index" : 39, "Resolution" : "1440x900 (75Hz)"},{"Index" : 40, "Resolution" : "1440x900 (85Hz)"},{"Index" : 41, "Resolution" : "1600x1200 (60Hz)"},{"Index" : 42, "Resolution" : "1600x1200 (65Hz)"},{"Index" : 43, "Resolution" : "1600x1200 (70Hz)"},{"Index" : 44, "Resolution" : "1600x1200 (75Hz)"},{"Index" : 45, "Resolution" : "1600x1200 (85Hz)"},{"Index" : 46, "Resolution" : "1680x1050 (60Hz)"},{"Index" : 47, "Resolution" : "1680x1050 (75Hz)"},{"Index" : 48, "Resolution" : "1680x1050 (85Hz)"},{"Index" : 49, "Resolution" : "1792x1344 (60Hz)"},{"Index" : 50, "Resolution" : "1792x1344 (75Hz)"},{"Index" : 51, "Resolution" : "1856x1392 (75Hz)"},{"Index" : 52, "Resolution" : "1856x1392 (75Hz)"},{"Index" : 53, "Resolution" : "1920x1200 (60Hz)"},{"Index" : 54, "Resolution" : "1920x1200 (75Hz)"},{"Index" : 55, "Resolution" : "1920x1200 (85Hz)"},{"Index" : 56, "Resolution" : "1920x1440 (60Hz)"},{"Index" : 57, "Resolution" : "1920x1440 (75Hz)"},{"Index" : 58, "Resolution" : "2560x1600 (60Hz)"},{"Index" : 59, "Resolution" : "2560x1600 (75Hz)"},{"Index" : 60, "Resolution" : "2560x1600 (85Hz)"},{"Index" : 61, "Resolution" : "2560x1600 (120Hz)"},{"Index" : 62, "Resolution" : "1366x768 (60Hz)"},{"Index" : 63, "Resolution" : "1920x1080 (60Hz)"},{"Index" : 64, "Resolution" : "1600x900 (60Hz)"},{"Index" : 65, "Resolution" : "1280x720 (60Hz)"}]}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
{"ComputerName" : "beta2"}
 No newline at end of file
{"ComputerName" : "myrpi3"}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests
            Utilities.ModifyEndpointForFilename(ref endpoint);

            HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK);
            if (platform.ToString() == "IoTDragonboard410c" || platform.ToString() == "IoTMinnowboardMax" || platform.ToString() == "IoTRaspberryPi2" || platform.ToString() == "IoTRaspberryPi3")
            if (platform == DevicePortalPlatforms.IoTDragonboard410c || platform == DevicePortalPlatforms.IoTMinnowboardMax || platform == DevicePortalPlatforms.IoTRaspberryPi2 || platform == DevicePortalPlatforms.IoTRaspberryPi3)
            {
                string filepath = Path.Combine("MockData", "IoT", friendlyOperatingSystemVersion, endpoint + "_" + platform.ToString() + "_" + friendlyOperatingSystemVersion + ".dat");
                response.Content = this.LoadContentFromFile(filepath);
Loading