예제 #1
0
    public void TestDeleteID()
    {
        Blueprint empty = new Blueprint(4, 4, 4);
        Blueprint arch  = new Blueprint(4, 4, 4);

        CollectionAssert.AreEqual(empty.GetBlocks(), arch.GetBlocks());

        arch.AddBlock(new Discrete3DCoord(0, 0, 0), 1);
        arch.AddBlock(new Discrete3DCoord(0, 1, 0), 1);
        arch.AddBlock(new Discrete3DCoord(0, 2, 0), 1);

        arch.AddBlock(new Discrete3DCoord(2, 0, 0), 1);
        arch.AddBlock(new Discrete3DCoord(2, 1, 0), 1);
        arch.AddBlock(new Discrete3DCoord(2, 2, 0), 1);

        arch.AddBlock(new Discrete3DCoord(0, 3, 0), 1);
        arch.AddBlock(new Discrete3DCoord(1, 3, 0), 1);
        arch.AddBlock(new Discrete3DCoord(2, 3, 0), 1);

        CollectionAssert.AreNotEqual(empty.GetBlocks(), arch.GetBlocks());

        arch.DeleteID(1);
        CollectionAssert.AreEqual(empty.GetBlocks(), arch.GetBlocks());
    }