Esempio n. 1
0
        public void RemoveAllApplicationsTestRemovingMultiple()
        {
            Maintenance maintenance = new Maintenance();

            m_managerStorage.AddApplication(new ApplicationStorageView(ApplicationState.AwaitingManifest, DateTime.Now, false, "username1"));
            m_managerStorage.AddApplication(new ApplicationStorageView(ApplicationState.Stopped, DateTime.Now, false, "username1"));
            m_managerStorage.AddApplication(new ApplicationStorageView(ApplicationState.Ready, DateTime.Now, false, "username1"));
            m_managerStorage.AddApplication(new ApplicationStorageView(ApplicationState.AwaitingManifest, DateTime.Now, false, "username1"));
            m_managerStorage.AddApplication(new ApplicationStorageView(ApplicationState.Stopped, DateTime.Now, false, "username1"));

            Assert.AreEqual(5, m_managerStorage.GetApplications().Length);

            maintenance.RemoveAllApplications(m_managerStorage);

            Assert.AreEqual(0, m_managerStorage.GetApplications().Length);
        }
Esempio n. 2
0
        public void RemoveAllApplicationsTestNothingToRemove()
        {
            Maintenance maintenance = new Maintenance();

            Assert.AreEqual(0, m_managerStorage.GetApplications().Length);

            maintenance.RemoveAllApplications(m_managerStorage);

            Assert.AreEqual(0, m_managerStorage.GetApplications().Length);
        }