public void Count_Should_Work_Correct() { //Arrange var microsystems = new Microsystems(); var computer = new Computer(1, Brand.DELL, 2300, 15.6, "grey"); var computer2 = new Computer(3, Brand.DELL, 2300, 15.6, "grey"); var computer3 = new Computer(4, Brand.DELL, 2300, 15.6, "grey"); //Act microsystems.CreateComputer(computer); microsystems.CreateComputer(computer2); microsystems.CreateComputer(computer3); //Assert Assert.AreEqual(3, microsystems.Count()); }
public void Create_Computer_Count_Should_Increase() { //Arrange var microsystems = new Microsystems(); var computer1 = new Computer(1, Brand.ACER, 1120, 15.6, "grey"); var computer2 = new Computer(2, Brand.ASUS, 2000, 15.6, "red"); //Act var expectedCount = 2; microsystems.CreateComputer(computer1); microsystems.CreateComputer(computer2); var actualCount = microsystems.Count(); //Assert Assert.AreEqual(expectedCount, actualCount); }
public void Remove_Should_Decrease_Count() { //Arrange var microsystems = new Microsystems(); var computer = new Computer(1, Brand.DELL, 2300, 15.6, "grey"); var computer2 = new Computer(3, Brand.DELL, 2300, 15.6, "grey"); var computer3 = new Computer(4, Brand.DELL, 2300, 15.6, "grey"); //Act microsystems.CreateComputer(computer); microsystems.CreateComputer(computer2); microsystems.CreateComputer(computer3); microsystems.Remove(1); //Assert Assert.AreEqual(2, microsystems.Count()); }
public void Remove_With_Brand_Should_Decrease_Count() { //Arrange var microsystems = new Microsystems(); var computer = new Computer(1, Brand.DELL, 15, 15.6, "grey"); var computer2 = new Computer(3, Brand.DELL, 17, 15.6, "grey"); var computer3 = new Computer(4, Brand.DELL, 2, 15.6, "grey"); var computer4 = new Computer(5, Brand.ACER, 10, 15.6, "grey"); //Act microsystems.CreateComputer(computer); microsystems.CreateComputer(computer2); microsystems.CreateComputer(computer3); microsystems.CreateComputer(computer4); microsystems.RemoveWithBrand(Brand.DELL); //Assert Assert.AreEqual(1, microsystems.Count()); }