public void AddItemWorkCentre()
        {
            Equipment item = new Equipment("Item 1");
            item.AddItem(new Equipment("Work Centre 1"));

            Assert.That(item.Items.Count, Is.EqualTo(1));
            Assert.That(item.Items[0].Name, Is.EqualTo("Work Centre 1"));

            item.AddItem(new Equipment("Work Centre 2"));

            Assert.That(item.Items.Count, Is.EqualTo(2));
            Assert.That(item.Items[1].Name, Is.EqualTo("Work Centre 2"));
        }
        public void AddItemEquipmentItem()
        {
            Equipment item = new Equipment("Item 1");
            item.AddItem(new Equipment("Item 1a"));

            Assert.That(item.Items.Count, Is.EqualTo(1));
            Assert.That(item.Items[0].Name, Is.EqualTo("Item 1a"));

            item.AddItem(new Equipment("Item 1b"));

            Assert.That(item.Items.Count, Is.EqualTo(2));
            Assert.That(item.Items[1].Name, Is.EqualTo("Item 1b"));
        }
        public void AddItemWorkCentre()
        {
            Equipment item = new Equipment("Item 1");

            item.AddItem(new Equipment("Work Centre 1"));

            Assert.That(item.Items.Count, Is.EqualTo(1));
            Assert.That(item.Items[0].Name, Is.EqualTo("Work Centre 1"));

            item.AddItem(new Equipment("Work Centre 2"));

            Assert.That(item.Items.Count, Is.EqualTo(2));
            Assert.That(item.Items[1].Name, Is.EqualTo("Work Centre 2"));
        }
        public void AddItemEquipmentItem()
        {
            Equipment item = new Equipment("Item 1");

            item.AddItem(new Equipment("Item 1a"));

            Assert.That(item.Items.Count, Is.EqualTo(1));
            Assert.That(item.Items[0].Name, Is.EqualTo("Item 1a"));

            item.AddItem(new Equipment("Item 1b"));

            Assert.That(item.Items.Count, Is.EqualTo(2));
            Assert.That(item.Items[1].Name, Is.EqualTo("Item 1b"));
        }
 public void AddItemSite()
 {
     Equipment item = new Equipment("Equipment 1");
     Assert.Throws<ArgumentException>(() => item.AddItem(new Site("Site 2")));
 }
 public void AddItemNull()
 {
     Equipment item = new Equipment("Item 1");
     Assert.Throws<ArgumentNullException>(() => item.AddItem(null));
 }
 public void AddItemEnterprise()
 {
     Equipment item = new Equipment("Item 1");
     Assert.Throws<ArgumentException>(() => item.AddItem(new Enterprise("My Enterprise")));
 }
        public void AddItemSite()
        {
            Equipment item = new Equipment("Equipment 1");

            Assert.Throws <ArgumentException>(() => item.AddItem(new Site("Site 2")));
        }
        public void AddItemNull()
        {
            Equipment item = new Equipment("Item 1");

            Assert.Throws <ArgumentNullException>(() => item.AddItem(null));
        }
        public void AddItemEnterprise()
        {
            Equipment item = new Equipment("Item 1");

            Assert.Throws <ArgumentException>(() => item.AddItem(new Enterprise("My Enterprise")));
        }