Exemple #1
0
        public void FacilityLayer_RemoveValuable_ValuableRemoved()
        {
            var layer = new FacilityLayer(3, 3);

            layer[0, 0].Put(_sampleLowerValuable);

            layer.Remove(_sampleLowerValuable);

            Assert.AreEqual(new FacilityObject(), layer[0, 0].LowerObject);
        }
Exemple #2
0
        public void FacilityLayer_RemoveLinkedObject_ObjectRemovedFromBothSpots()
        {
            var layer = new FacilityLayer(3, 3);

            _sampleLowerValuable.LinkTo(_sampleLowerValuable2);
            layer[0, 0].Put(_sampleLowerValuable);
            layer[0, 1].Put(_sampleLowerValuable2);

            layer.Remove(_sampleLowerValuable);

            Assert.AreEqual(new FacilityObject(), layer[0, 0].LowerObject);
            Assert.AreEqual(new FacilityObject(), layer[0, 1].LowerObject);
        }