Loading WindowsDevicePortalWrapper/UnitTestProject/BaseTests.cs +12 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests /// </summary> public BaseTests() { TestHelpers.EstablishMockConnection(this.PlatformType, this.OperatingSystemVersion); TestHelpers.EstablishMockConnection(this.PlatformType, this.FriendlyOperatingSystemVersion); } /// <summary> Loading @@ -48,6 +48,17 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests } } /// <summary> /// Gets the overridable friendly OS Version used to find the file names of mock data. /// </summary> protected virtual string FriendlyOperatingSystemVersion { get { return null; } } /// <summary> /// Cleanup which should run after each test. /// </summary> Loading WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/XboxOne/XboxHelpers.cs +3 −2 Original line number Diff line number Diff line Loading @@ -18,10 +18,11 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests /// <summary> /// Helper method for verifying OS info based on a given version. /// </summary> /// <param name="friendlyOperatingSystemVersion">The friendly version of the OS we are targeting.</param> /// <param name="operatingSystemVersion">The version of the OS we are targeting.</param> public static void VerifyOsInformation(string operatingSystemVersion) public static void VerifyOsInformation(string friendlyOperatingSystemVersion, string operatingSystemVersion) { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.MachineNameApi, DevicePortalPlatforms.XboxOne, operatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.MachineNameApi, DevicePortalPlatforms.XboxOne, friendlyOperatingSystemVersion, HttpMethods.Get); Task<string> getNameTask = TestHelpers.Portal.GetDeviceName(); getNameTask.Wait(); Loading WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/XboxOne/XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700.cs→WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/XboxOne/XboxOne_rs1_xbox_rel_1608.cs +24 −13 Original line number Diff line number Diff line //---------------------------------------------------------------------------------------------- // <copyright file="XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700.cs" company="Microsoft Corporation"> // <copyright file="XboxOne_rs1_xbox_rel_1608.cs" company="Microsoft Corporation"> // Licensed under the MIT License. See LICENSE.TXT in the project root license information. // </copyright> //---------------------------------------------------------------------------------------------- Loading @@ -13,10 +13,10 @@ using static Microsoft.Tools.WindowsDevicePortal.DevicePortal; namespace Microsoft.Tools.WindowsDevicePortal.Tests { /// <summary> /// Test class for XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700 version /// Test class for XboxOne_rs1_xbox_rel_1608 version /// </summary> [TestClass] public class XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700 : BaseTests public class XboxOne_rs1_xbox_rel_1608 : BaseTests { /// <summary> /// Gets the Platform type these tests are targeting. Loading @@ -29,6 +29,17 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests } } /// <summary> /// Gets the friendly OS Version these tests are targeting. /// </summary> protected override string FriendlyOperatingSystemVersion { get { return "rs1_xbox_rel_1608"; } } /// <summary> /// Gets the OS Version these tests are targeting. /// </summary> Loading @@ -48,7 +59,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetXboxLiveUserListTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.XboxLiveUserApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.XboxLiveUserApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<UserList> getUserTask = TestHelpers.Portal.GetXboxLiveUsers(); getUserTask.Wait(); Loading @@ -74,7 +85,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetOsInfo_XboxOne_1608() { XboxHelpers.VerifyOsInformation(this.OperatingSystemVersion); XboxHelpers.VerifyOsInformation(this.FriendlyOperatingSystemVersion, this.OperatingSystemVersion); } /// <summary> Loading @@ -85,7 +96,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetXboxSettingsTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.XboxSettingsApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.XboxSettingsApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<XboxSettingList> getSettingsTask = TestHelpers.Portal.GetXboxSettings(); getSettingsTask.Wait(); Loading Loading @@ -120,7 +131,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void AppFileExplorerGetKnownFolderTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.KnownFoldersApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.KnownFoldersApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<KnownFolders> getKnownFoldersTask = TestHelpers.Portal.GetKnownFolders(); getKnownFoldersTask.Wait(); Loading @@ -142,7 +153,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void AppFileExplorerGetFolderContentsTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.GetFilesApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.GetFilesApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<FolderContents> getFolderContentsTask = TestHelpers.Portal.GetFolderContents("DevelopmentFiles"); getFolderContentsTask.Wait(); Loading Loading @@ -245,7 +256,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetRunningProcessesTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.RunningProcessApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.RunningProcessApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<RunningProcesses> getRunningProcessesTask = TestHelpers.Portal.GetRunningProcesses(); getRunningProcessesTask.Wait(); Loading @@ -262,7 +273,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetRunningProcessesWebSocketTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.RunningProcessApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.WebSocket); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.RunningProcessApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.WebSocket); ManualResetEvent runningProcessesReceived = new ManualResetEvent(false); RunningProcesses runningProcesses = null; Loading Loading @@ -302,7 +313,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetSystemPerfTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.SystemPerfApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.SystemPerfApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<SystemPerformanceInformation> getSystemPerfTask = TestHelpers.Portal.GetSystemPerf(); getSystemPerfTask.Wait(); Loading @@ -319,7 +330,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetSystemPerfWebSocketTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.SystemPerfApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.WebSocket); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.SystemPerfApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.WebSocket); ManualResetEvent systemPerfReceived = new ManualResetEvent(false); SystemPerformanceInformation systemPerfInfo = null; Loading WindowsDevicePortalWrapper/UnitTestProject/MockData/XboxOne/14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700/WebSocket_api_resourcemanager_processes_XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700.dat→WindowsDevicePortalWrapper/UnitTestProject/MockData/XboxOne/rs1_xbox_rel_1608/WebSocket_api_resourcemanager_processes_XboxOne_rs1_xbox_rel_1608.dat +0 −0 File moved. View file WindowsDevicePortalWrapper/UnitTestProject/MockData/XboxOne/14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700/WebSocket_api_resourcemanager_systemperf_XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700.dat→WindowsDevicePortalWrapper/UnitTestProject/MockData/XboxOne/rs1_xbox_rel_1608/WebSocket_api_resourcemanager_systemperf_XboxOne_rs1_xbox_rel_1608.dat +0 −0 File moved. View file Loading
WindowsDevicePortalWrapper/UnitTestProject/BaseTests.cs +12 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests /// </summary> public BaseTests() { TestHelpers.EstablishMockConnection(this.PlatformType, this.OperatingSystemVersion); TestHelpers.EstablishMockConnection(this.PlatformType, this.FriendlyOperatingSystemVersion); } /// <summary> Loading @@ -48,6 +48,17 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests } } /// <summary> /// Gets the overridable friendly OS Version used to find the file names of mock data. /// </summary> protected virtual string FriendlyOperatingSystemVersion { get { return null; } } /// <summary> /// Cleanup which should run after each test. /// </summary> Loading
WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/XboxOne/XboxHelpers.cs +3 −2 Original line number Diff line number Diff line Loading @@ -18,10 +18,11 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests /// <summary> /// Helper method for verifying OS info based on a given version. /// </summary> /// <param name="friendlyOperatingSystemVersion">The friendly version of the OS we are targeting.</param> /// <param name="operatingSystemVersion">The version of the OS we are targeting.</param> public static void VerifyOsInformation(string operatingSystemVersion) public static void VerifyOsInformation(string friendlyOperatingSystemVersion, string operatingSystemVersion) { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.MachineNameApi, DevicePortalPlatforms.XboxOne, operatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.MachineNameApi, DevicePortalPlatforms.XboxOne, friendlyOperatingSystemVersion, HttpMethods.Get); Task<string> getNameTask = TestHelpers.Portal.GetDeviceName(); getNameTask.Wait(); Loading
WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/XboxOne/XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700.cs→WindowsDevicePortalWrapper/UnitTestProject/Device-VersionTests/XboxOne/XboxOne_rs1_xbox_rel_1608.cs +24 −13 Original line number Diff line number Diff line //---------------------------------------------------------------------------------------------- // <copyright file="XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700.cs" company="Microsoft Corporation"> // <copyright file="XboxOne_rs1_xbox_rel_1608.cs" company="Microsoft Corporation"> // Licensed under the MIT License. See LICENSE.TXT in the project root license information. // </copyright> //---------------------------------------------------------------------------------------------- Loading @@ -13,10 +13,10 @@ using static Microsoft.Tools.WindowsDevicePortal.DevicePortal; namespace Microsoft.Tools.WindowsDevicePortal.Tests { /// <summary> /// Test class for XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700 version /// Test class for XboxOne_rs1_xbox_rel_1608 version /// </summary> [TestClass] public class XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700 : BaseTests public class XboxOne_rs1_xbox_rel_1608 : BaseTests { /// <summary> /// Gets the Platform type these tests are targeting. Loading @@ -29,6 +29,17 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests } } /// <summary> /// Gets the friendly OS Version these tests are targeting. /// </summary> protected override string FriendlyOperatingSystemVersion { get { return "rs1_xbox_rel_1608"; } } /// <summary> /// Gets the OS Version these tests are targeting. /// </summary> Loading @@ -48,7 +59,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetXboxLiveUserListTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.XboxLiveUserApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.XboxLiveUserApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<UserList> getUserTask = TestHelpers.Portal.GetXboxLiveUsers(); getUserTask.Wait(); Loading @@ -74,7 +85,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetOsInfo_XboxOne_1608() { XboxHelpers.VerifyOsInformation(this.OperatingSystemVersion); XboxHelpers.VerifyOsInformation(this.FriendlyOperatingSystemVersion, this.OperatingSystemVersion); } /// <summary> Loading @@ -85,7 +96,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetXboxSettingsTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.XboxSettingsApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.XboxSettingsApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<XboxSettingList> getSettingsTask = TestHelpers.Portal.GetXboxSettings(); getSettingsTask.Wait(); Loading Loading @@ -120,7 +131,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void AppFileExplorerGetKnownFolderTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.KnownFoldersApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.KnownFoldersApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<KnownFolders> getKnownFoldersTask = TestHelpers.Portal.GetKnownFolders(); getKnownFoldersTask.Wait(); Loading @@ -142,7 +153,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void AppFileExplorerGetFolderContentsTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.GetFilesApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.GetFilesApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<FolderContents> getFolderContentsTask = TestHelpers.Portal.GetFolderContents("DevelopmentFiles"); getFolderContentsTask.Wait(); Loading Loading @@ -245,7 +256,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetRunningProcessesTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.RunningProcessApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.RunningProcessApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<RunningProcesses> getRunningProcessesTask = TestHelpers.Portal.GetRunningProcesses(); getRunningProcessesTask.Wait(); Loading @@ -262,7 +273,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetRunningProcessesWebSocketTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.RunningProcessApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.WebSocket); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.RunningProcessApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.WebSocket); ManualResetEvent runningProcessesReceived = new ManualResetEvent(false); RunningProcesses runningProcesses = null; Loading Loading @@ -302,7 +313,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetSystemPerfTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.SystemPerfApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.Get); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.SystemPerfApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.Get); Task<SystemPerformanceInformation> getSystemPerfTask = TestHelpers.Portal.GetSystemPerf(); getSystemPerfTask.Wait(); Loading @@ -319,7 +330,7 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests [TestMethod] public void GetSystemPerfWebSocketTest_XboxOne_1608() { TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.SystemPerfApi, this.PlatformType, this.OperatingSystemVersion, HttpMethods.WebSocket); TestHelpers.MockHttpResponder.AddMockResponse(DevicePortal.SystemPerfApi, this.PlatformType, this.FriendlyOperatingSystemVersion, HttpMethods.WebSocket); ManualResetEvent systemPerfReceived = new ManualResetEvent(false); SystemPerformanceInformation systemPerfInfo = null; Loading
WindowsDevicePortalWrapper/UnitTestProject/MockData/XboxOne/14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700/WebSocket_api_resourcemanager_processes_XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700.dat→WindowsDevicePortalWrapper/UnitTestProject/MockData/XboxOne/rs1_xbox_rel_1608/WebSocket_api_resourcemanager_processes_XboxOne_rs1_xbox_rel_1608.dat +0 −0 File moved. View file
WindowsDevicePortalWrapper/UnitTestProject/MockData/XboxOne/14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700/WebSocket_api_resourcemanager_systemperf_XboxOne_14385_1002_amd64fre_rs1_xbox_rel_1608_160709_1700.dat→WindowsDevicePortalWrapper/UnitTestProject/MockData/XboxOne/rs1_xbox_rel_1608/WebSocket_api_resourcemanager_systemperf_XboxOne_rs1_xbox_rel_1608.dat +0 −0 File moved. View file