diff --git a/UnitTests/PInvoke/Security/AdvApi32/AppMgmtTests.cs b/UnitTests/PInvoke/Security/AdvApi32/AppMgmtTests.cs index 362e7b5c..dac9f05e 100644 --- a/UnitTests/PInvoke/Security/AdvApi32/AppMgmtTests.cs +++ b/UnitTests/PInvoke/Security/AdvApi32/AppMgmtTests.cs @@ -10,7 +10,7 @@ namespace Vanara.PInvoke.Tests [TestFixture()] public class AppMgmtTests { - // [Test] TODO: Figure out how to test + [Test] // TODO: Figure out how to test public void GetLocalManagedApplicationsTest() { var l = GetLocalManagedApplications(true).ToArray(); @@ -19,7 +19,7 @@ namespace Vanara.PInvoke.Tests TestContext.WriteLine("; ", l.Select(i => i.pszDeploymentName)); } - // [Test] TODO: Figure out how to test + [Test] // TODO: Figure out how to test public void GetManagedApplicationCategoriesTest() { var l = GetManagedApplicationCategories().ToArray(); @@ -27,12 +27,21 @@ namespace Vanara.PInvoke.Tests Assert.That(l, Is.Not.Empty); } - // [Test] TODO: Figure out how to test + [Test] // TODO: Figure out how to test public void GetManagedApplicationsTest() { var l = GetManagedApplications(null).ToArray(); TestContext.WriteLine("; ", l.Select(i => i.pszPackageName)); Assert.That(l, Is.Not.Empty); } + + [Test] + public void InstallApplicationTest() + { + var id = new INSTALLDATA { Type = INSTALLSPECTYPE.FILEEXT }; + var pExt = new SafeCoTaskMemString("*.jpg"); + id.Spec = new INSTALLSPEC { FileExt = (IntPtr)pExt }; + Assert.That(InstallApplication(id), ResultIs.Successful); + } } } \ No newline at end of file