ZeroInstall.DesktopIntegration.IntegrationManagerTest.TestRemoveApp C# (CSharp) Method

TestRemoveApp() private method

private TestRemoveApp ( ) : void
return void
        public void TestRemoveApp()
        {
            var target = new FeedTarget(FeedTest.Test1Uri, new Feed {Name = "Test"});
            var appEntry = _integrationManager.AddApp(target);

            // Inject access point into AppEntry (without running integration)
            using (var unapplyFlag = new TemporaryFlagFile("0install-unit-tests"))
            {
                appEntry.AccessPoints = new AccessPointList {Entries = {new MockAccessPoint {UnapplyFlagPath = unapplyFlag}}};

                _integrationManager.RemoveApp(appEntry);
                _integrationManager.AppList.Entries.Should().BeEmpty();

                unapplyFlag.Set.Should().BeTrue(because: "Access points should be unapplied when their AppEntry is removed");
                _integrationManager.Invoking(x => x.RemoveApp(appEntry))
                    .ShouldNotThrow(because: "Allow multiple removals of applications.");
            }
        }