-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(very very bad and very very random)
- Loading branch information
Showing
5 changed files
with
85 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Rebound.Rebound.Pages.ControlPanel; | ||
using System.Linq; | ||
using Windows.ApplicationModel.Core; | ||
using Microsoft.UI.Xaml.Controls; | ||
using System.Management; | ||
|
||
namespace Rebound.Tests.ControlPanel | ||
{ | ||
[TestClass] | ||
public class SystemAndSecurityTests | ||
{ | ||
private SystemAndSecurity _systemAndSecurity; | ||
|
||
[TestInitialize] | ||
public void Setup() | ||
{ | ||
_systemAndSecurity = new SystemAndSecurity(); | ||
} | ||
|
||
[TestMethod] | ||
public void Test_UACStatus() | ||
{ | ||
int status = SystemAndSecurity.UACStatus(); | ||
Assert.IsTrue(status >= -1000 && status <= 3, "UACStatus should return a value between -1000 and 3."); | ||
} | ||
|
||
[TestMethod] | ||
public void Test_DecodeProductState() | ||
{ | ||
string state = _systemAndSecurity.DecodeProductState(0x10000); | ||
Assert.AreEqual("B", state, "DecodeProductState should correctly decode the product state."); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Rebound; | ||
using System.Threading.Tasks; | ||
|
||
namespace Rebound.Tests.Rebound | ||
{ | ||
[TestClass] | ||
public class UninstallationWindowTests | ||
{ | ||
private UninstallationWindow _uninstallationWindow; | ||
|
||
[TestInitialize] | ||
public void Setup() | ||
{ | ||
_uninstallationWindow = new UninstallationWindow(); | ||
} | ||
|
||
[TestMethod] | ||
public async Task Test_UninstallAppPackage() | ||
{ | ||
await _uninstallationWindow.UninstallAppPackage("packageFamilyName", "displayAppName", "lnkFile", "lnkDestination", "lnkDisplayName"); | ||
Assert.AreEqual(3, _uninstallationWindow.currentStep, "currentStep should be 3 after UninstallAppPackage is called."); | ||
} | ||
|
||
[TestMethod] | ||
public async Task Test_DeleteShortcut() | ||
{ | ||
await _uninstallationWindow.DeleteShortcut("displayAppName", "lnkDestination", "lnkDisplayName"); | ||
Assert.AreEqual(1, _uninstallationWindow.currentStep, "currentStep should be 1 after DeleteShortcut is called."); | ||
} | ||
|
||
[TestMethod] | ||
public async Task Test_ReplaceShortcut() | ||
{ | ||
await _uninstallationWindow.ReplaceShortcut("displayAppName", "lnkFile", "lnkDestination", "lnkDisplayName"); | ||
Assert.AreEqual(1, _uninstallationWindow.currentStep, "currentStep should be 1 after ReplaceShortcut is called."); | ||
} | ||
} | ||
} |