示例#1
0
    public void Contains_Should_Return_False_With_Invalid_Number()
    {
        //Arrange

        var microsystems = new Microsystems();
        var computer     = new Computer(1, Brand.DELL, 2300, 15.6, "grey");

        //Act
        microsystems.CreateComputer(computer);

        //Assert

        Assert.IsFalse(microsystems.Contains(3));
    }
示例#2
0
    public void Remove_With_Brand_Should_Not_Contain_Removed_Computers()
    {
        //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");
        var computer4    = new Computer(5, Brand.ACER, 2300, 15.6, "grey");

        //Act
        microsystems.CreateComputer(computer);
        microsystems.CreateComputer(computer2);
        microsystems.CreateComputer(computer3);
        microsystems.CreateComputer(computer4);
        microsystems.RemoveWithBrand(Brand.DELL);


        //Assert

        Assert.IsFalse(microsystems.Contains(1));
        Assert.IsFalse(microsystems.Contains(3));
        Assert.IsFalse(microsystems.Contains(4));
    }
示例#3
0
    public void After_Remove_Computer_Should_Not_Exist()
    {
        //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.IsFalse(microsystems.Contains(1));
    }