Esempio n. 1
0
        public void CollectionMethodsTest()
        {
            project = new Project <Manager <Mac> >(testName, testList);
            Assert.DoesNotThrow(() => project.printProjectTeam());

            Assert.AreEqual(project.IsReadOnly, false);

            var testManager = new Manager <Mac>("Alexey", new Mac(2015, 50000));

            project.Add(testManager);
            Assert.AreEqual(4, project.Count());
            Assert.IsTrue(project.Contains(testManager));

            project.Remove(testManager);
            Assert.AreEqual(3, project.Count());

            Assert.NotNull(project.GetEnumerator());

            project.Clear();
            Assert.AreEqual(0, project.Count());
        }