public void RemoveAppxPackageFromTargetTest_Existing()
        {
            MsIotApiWrapper msIotApiWrapper  = new MsIotApiWrapper("127.0.0.1", "user", "password", new MockHttpMessageHandler());
            AppxPackage     removablePackage = new AppxPackage
            {
                CanUninstall      = true,
                PackageFullName   = "Exists",
                PackageName       = "AppName",
                PackageRelativeId = "PackageRelativeId"
            };

            Assert.DoesNotThrow(() => msIotApiWrapper.RemoveAppxPackageFromTarget(removablePackage));
        }
        public void RemoveAppxPackageFromTargetTest_NotExisting()
        {
            MsIotApiWrapper msIotApiWrapper     = new MsIotApiWrapper("127.0.0.1", "user", "password", new MockHttpMessageHandler());
            AppxPackage     notRemovablePackage = new AppxPackage
            {
                CanUninstall      = true,
                PackageFullName   = "DoesNotExist",
                PackageName       = "AppName",
                PackageRelativeId = "PackageRelativeId"
            };

            AggregateException exception = Assert.Throws <AggregateException>(() => msIotApiWrapper.RemoveAppxPackageFromTarget(notRemovablePackage));

            Assert.That(exception.InnerException.Message.Contains("500"));
        }