Loading WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/IoT/IoT_rs1_release.cs +27 −23 Original line number Diff line number Diff line Loading @@ -4,12 +4,9 @@ // </copyright> //---------------------------------------------------------------------------------------------- using System; using System.Threading.Tasks; using Microsoft.VisualStudio.TestTools.UnitTesting; using static Microsoft.Tools.WindowsDevicePortal.DevicePortal; using System.Net.Http; using System.Net; namespace Microsoft.Tools.WindowsDevicePortal.Tests { Loading Loading @@ -145,6 +142,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); ControllerDriverInfo controllerDriver = getTask.Result; // Check some known things about this response. Assert.AreEqual("Inbox Driver", controllerDriver.CurrentDriver); } Loading @@ -166,9 +164,9 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); DateTimeInfo dateTime = getTask.Result; // Check some known things about this response. Assert.AreEqual(22, dateTime.CurrentDateTime.day); // Check some known things about this response. Assert.AreEqual(22, dateTime.CurrentDateTime.Day); } /// <summary> Loading @@ -188,10 +186,10 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); TimezoneInfo timezone = getTask.Result; // Check some known things about this response. 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); // Check some known things about this response. 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); } /// <summary> Loading @@ -210,11 +208,12 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests getTask.Wait(); Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); IoTOSInfo IoTInfo = getTask.Result; IoTOSInfo deviceIoTInfo = getTask.Result; // Check some known things about this response. Assert.AreEqual("Raspberry Pi 3", IoTInfo.Model); Assert.AreEqual("beta2", IoTInfo.Name); Assert.AreEqual("10.0.14393.67", IoTInfo.OSVersion); Assert.AreEqual("Raspberry Pi 3", deviceIoTInfo.Model); Assert.AreEqual("beta2", deviceIoTInfo.Name); Assert.AreEqual("10.0.14393.67", deviceIoTInfo.OSVersion); } /// <summary> Loading @@ -234,10 +233,11 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); StatusInfo stats = getTask.Result; // Check some known things about this response. Assert.AreEqual("2016-08-22 at 14:15", stats.lastCheckTime); Assert.AreEqual("2016-08-18 at 00:00", stats.lastUpdateTime); Assert.AreEqual("Your device is up to date.", stats.updateStatusMessage); Assert.AreEqual("2016-08-22 at 14:15", stats.LastCheckTime); Assert.AreEqual("2016-08-18 at 00:00", stats.LastUpdateTime); Assert.AreEqual("Your device is up to date.", stats.UpdateStatusMessage); } /// <summary> Loading @@ -257,8 +257,9 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); UpdateInstallTimeInfo installTime = getTask.Result; // Check some known things about this response. Assert.AreEqual(0, installTime.rebootscheduled); Assert.AreEqual(0, installTime.Rebootscheduled); } /// <summary> Loading @@ -278,6 +279,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); RemoteSettingsStatusInfo installTime = getTask.Result; // Check some known things about this response. Assert.AreEqual(false, installTime.IsRunning); Assert.AreEqual(false, installTime.IsScheduled); Loading @@ -299,10 +301,11 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests getTask.Wait(); Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); SoftAPSettingsInfo SoftAPSettings = getTask.Result; SoftAPSettingsInfo softAPSettings = getTask.Result; // Check some known things about this response. Assert.AreEqual("true", SoftAPSettings.SoftAPEnabled); Assert.AreEqual("SoftAPSsid", SoftAPSettings.SoftApSsid); Assert.AreEqual("true", softAPSettings.SoftAPEnabled); Assert.AreEqual("SoftAPSsid", softAPSettings.SoftApSsid); } /// <summary> Loading @@ -321,10 +324,11 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests getTask.Wait(); Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); AllJoynSettingsInfo AllJoynSettings = getTask.Result; AllJoynSettingsInfo allJoynSettings = getTask.Result; // Check some known things about this response. Assert.AreEqual("IoTCore Onboarding service", AllJoynSettings.AllJoynOnboardingDefaultDescription); Assert.AreEqual("Microsoft", AllJoynSettings.AllJoynOnboardingDefaultManufacturer); Assert.AreEqual("IoTCore Onboarding service", allJoynSettings.AllJoynOnboardingDefaultDescription); Assert.AreEqual("Microsoft", allJoynSettings.AllJoynOnboardingDefaultManufacturer); } } } WindowsDevicePortalWrapper/UnitTestProject/MockHttpResponder.cs +2 −2 Original line number Diff line number Diff line Loading @@ -80,12 +80,12 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests string filepath = Path.Combine("MockData", "IoT", friendlyOperatingSystemVersion, endpoint + "_" + platform.ToString() + "_" + friendlyOperatingSystemVersion + ".dat"); response.Content = this.LoadContentFromFile(filepath); } else { else { string filepath = Path.Combine("MockData", platform.ToString(), friendlyOperatingSystemVersion, endpoint + "_" + platform.ToString() + "_" + friendlyOperatingSystemVersion + ".dat"); response.Content = this.LoadContentFromFile(filepath); } this.mockResponses.Add(endpoint.ToLowerInvariant(), response); } Loading WindowsDevicePortalWrapper/UnitTestProject/WDPMockImplementations/RestGet.cs +0 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Submits the http get request to the specified uri. /// </summary> /// <param name="uri">The uri to which the get request will be issued.</param> /// /// <param name="validateCertificate">Whether the certificate should be validated.</param> /// <returns>Response data as a stream.</returns> private async Task<Stream> Get( Uri uri) Loading WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Core/Power.cs +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <summary> /// API for getting a sleep study report. /// </summary> private static readonly string SleepStudyTransformApi = "api/power/sleepstudy/transform"; public static readonly string SleepStudyTransformApi = "api/power/sleepstudy/transform"; /// <summary> /// Returns the current active power scheme. Loading WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/DevicePortal.cs +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <summary> /// Endpoint used to access the certificate. /// </summary> private static readonly string RootCertificateEndpoint = "config/rootcertificate"; public static readonly string RootCertificateEndpoint = "config/rootcertificate"; /// <summary> /// Expected number of OS version sections once the OS version is split by period characters Loading Loading
WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/IoT/IoT_rs1_release.cs +27 −23 Original line number Diff line number Diff line Loading @@ -4,12 +4,9 @@ // </copyright> //---------------------------------------------------------------------------------------------- using System; using System.Threading.Tasks; using Microsoft.VisualStudio.TestTools.UnitTesting; using static Microsoft.Tools.WindowsDevicePortal.DevicePortal; using System.Net.Http; using System.Net; namespace Microsoft.Tools.WindowsDevicePortal.Tests { Loading Loading @@ -145,6 +142,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); ControllerDriverInfo controllerDriver = getTask.Result; // Check some known things about this response. Assert.AreEqual("Inbox Driver", controllerDriver.CurrentDriver); } Loading @@ -166,9 +164,9 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); DateTimeInfo dateTime = getTask.Result; // Check some known things about this response. Assert.AreEqual(22, dateTime.CurrentDateTime.day); // Check some known things about this response. Assert.AreEqual(22, dateTime.CurrentDateTime.Day); } /// <summary> Loading @@ -188,10 +186,10 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); TimezoneInfo timezone = getTask.Result; // Check some known things about this response. 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); // Check some known things about this response. 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); } /// <summary> Loading @@ -210,11 +208,12 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests getTask.Wait(); Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); IoTOSInfo IoTInfo = getTask.Result; IoTOSInfo deviceIoTInfo = getTask.Result; // Check some known things about this response. Assert.AreEqual("Raspberry Pi 3", IoTInfo.Model); Assert.AreEqual("beta2", IoTInfo.Name); Assert.AreEqual("10.0.14393.67", IoTInfo.OSVersion); Assert.AreEqual("Raspberry Pi 3", deviceIoTInfo.Model); Assert.AreEqual("beta2", deviceIoTInfo.Name); Assert.AreEqual("10.0.14393.67", deviceIoTInfo.OSVersion); } /// <summary> Loading @@ -234,10 +233,11 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); StatusInfo stats = getTask.Result; // Check some known things about this response. Assert.AreEqual("2016-08-22 at 14:15", stats.lastCheckTime); Assert.AreEqual("2016-08-18 at 00:00", stats.lastUpdateTime); Assert.AreEqual("Your device is up to date.", stats.updateStatusMessage); Assert.AreEqual("2016-08-22 at 14:15", stats.LastCheckTime); Assert.AreEqual("2016-08-18 at 00:00", stats.LastUpdateTime); Assert.AreEqual("Your device is up to date.", stats.UpdateStatusMessage); } /// <summary> Loading @@ -257,8 +257,9 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); UpdateInstallTimeInfo installTime = getTask.Result; // Check some known things about this response. Assert.AreEqual(0, installTime.rebootscheduled); Assert.AreEqual(0, installTime.Rebootscheduled); } /// <summary> Loading @@ -278,6 +279,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); RemoteSettingsStatusInfo installTime = getTask.Result; // Check some known things about this response. Assert.AreEqual(false, installTime.IsRunning); Assert.AreEqual(false, installTime.IsScheduled); Loading @@ -299,10 +301,11 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests getTask.Wait(); Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); SoftAPSettingsInfo SoftAPSettings = getTask.Result; SoftAPSettingsInfo softAPSettings = getTask.Result; // Check some known things about this response. Assert.AreEqual("true", SoftAPSettings.SoftAPEnabled); Assert.AreEqual("SoftAPSsid", SoftAPSettings.SoftApSsid); Assert.AreEqual("true", softAPSettings.SoftAPEnabled); Assert.AreEqual("SoftAPSsid", softAPSettings.SoftApSsid); } /// <summary> Loading @@ -321,10 +324,11 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests getTask.Wait(); Assert.AreEqual(TaskStatus.RanToCompletion, getTask.Status); AllJoynSettingsInfo AllJoynSettings = getTask.Result; AllJoynSettingsInfo allJoynSettings = getTask.Result; // Check some known things about this response. Assert.AreEqual("IoTCore Onboarding service", AllJoynSettings.AllJoynOnboardingDefaultDescription); Assert.AreEqual("Microsoft", AllJoynSettings.AllJoynOnboardingDefaultManufacturer); Assert.AreEqual("IoTCore Onboarding service", allJoynSettings.AllJoynOnboardingDefaultDescription); Assert.AreEqual("Microsoft", allJoynSettings.AllJoynOnboardingDefaultManufacturer); } } }
WindowsDevicePortalWrapper/UnitTestProject/MockHttpResponder.cs +2 −2 Original line number Diff line number Diff line Loading @@ -80,12 +80,12 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests string filepath = Path.Combine("MockData", "IoT", friendlyOperatingSystemVersion, endpoint + "_" + platform.ToString() + "_" + friendlyOperatingSystemVersion + ".dat"); response.Content = this.LoadContentFromFile(filepath); } else { else { string filepath = Path.Combine("MockData", platform.ToString(), friendlyOperatingSystemVersion, endpoint + "_" + platform.ToString() + "_" + friendlyOperatingSystemVersion + ".dat"); response.Content = this.LoadContentFromFile(filepath); } this.mockResponses.Add(endpoint.ToLowerInvariant(), response); } Loading
WindowsDevicePortalWrapper/UnitTestProject/WDPMockImplementations/RestGet.cs +0 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Submits the http get request to the specified uri. /// </summary> /// <param name="uri">The uri to which the get request will be issued.</param> /// /// <param name="validateCertificate">Whether the certificate should be validated.</param> /// <returns>Response data as a stream.</returns> private async Task<Stream> Get( Uri uri) Loading
WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Core/Power.cs +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <summary> /// API for getting a sleep study report. /// </summary> private static readonly string SleepStudyTransformApi = "api/power/sleepstudy/transform"; public static readonly string SleepStudyTransformApi = "api/power/sleepstudy/transform"; /// <summary> /// Returns the current active power scheme. Loading
WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/DevicePortal.cs +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <summary> /// Endpoint used to access the certificate. /// </summary> private static readonly string RootCertificateEndpoint = "config/rootcertificate"; public static readonly string RootCertificateEndpoint = "config/rootcertificate"; /// <summary> /// Expected number of OS version sections once the OS version is split by period characters Loading