Example #1
0
        public void WorldObjectDeletesWhenRemovedFromDictionary()
        {
            var dictionary = new WorldObjectDictionary <int, IWorldObject>();
            var mockObject = new Mock <IWorldObject>();

            dictionary.Add(3, mockObject.Object);
            dictionary.Remove(3);

            mockObject.Verify(mock => mock.Delete(), Times.Once());
        }
 public void DeleteShipComponent(Coordinate position)
 {
     shipComponents.Remove(position);
 }
 public void DeleteBlock(Coordinate position)
 {
     blocks.Remove(position);
 }
 public void DeletePipeLink(CoordinatePair edge)
 {
     pipeLinks.Remove(edge);
 }
 public void DeletePipe(Coordinate position, EdgeType firstEdge, EdgeType secondEdge)
 {
     doubleEdgedPipes.Remove(new PipePosition(position, firstEdge, secondEdge));
 }