示例#1
0
    public void CreateItem_IsItemsCountIncreased()
    {
        DummyContainer       container = CreateTestContainer();
        IEnumerable <Weapon> weapons   = CreateWeaponsList(5);

        container.UpdateContainer(weapons);
        Weapon weapon = new Weapon();

        container.CreateItem(weapon);

        Assert.AreEqual(6, container.Items.Count());
    }
示例#2
0
    public void GetItem_IsItemSame()
    {
        DummyContainer       container = CreateTestContainer();
        IEnumerable <Weapon> weapons   = CreateWeaponsList(5);

        container.UpdateContainer(weapons);
        Weapon weapon = new Weapon();

        container.CreateItem(weapon);

        DummyItem item = container.GetItem(weapon);

        Assert.AreSame(weapon, item.Data);
    }