public void CheckIfDoubleEdgedPipeIsDeletedCorrectly() { var position = new Coordinate(2, 3); var pipe = new DoubleEdgedPipe(EdgeType.DOWN, EdgeType.UP); var key = new PipePosition(position, pipe.FirstEdge, pipe.SecondEdge); doubleEdgedPipes.Add(key, mockPipe.Object); blueprintBuilderViewModel.DoubleEdgePipeDeleted(mockBlueprint.Object, position, pipe); Assert.IsFalse(doubleEdgedPipes.ContainsKey(key)); }
public void ShipComponentIsDeletedCorrectly() { var position = new Coordinate(1, 2); shipComponents.Add(position, mockBuilderObject.Object); objectTable.DeleteShipComponent(position); Assert.IsFalse(shipComponents.ContainsKey(position)); }
public void BlockIsDeletedCorrectly() { var position = new Coordinate(1, 2); blocks.Add(position, mockBuilderObject.Object); objectTable.DeleteBlock(position); Assert.IsFalse(blocks.ContainsKey(position)); }
public void PipeLinkIsDeletedCorrectly() { var position = new Coordinate(1, 4); var connectingPosition = new Coordinate(2, 4); var edge = new CoordinatePair(position, connectingPosition); pipeLinks[new CoordinatePair(position, connectingPosition)] = mockBuilderObject.Object; objectTable.DeletePipeLink(edge); Assert.IsFalse(pipeLinks.ContainsKey(new CoordinatePair(position, connectingPosition))); }
public void CheckIfPipeIsDeletedCorrectly() { var position = new Coordinate(1, 4); var key = new PipePosition(position, EdgeType.LEFT, EdgeType.RIGHT); doubleEdgedPipes.Add(key, mockBuilderObject.Object); objectTable.DeletePipe(position, EdgeType.LEFT, EdgeType.RIGHT); Assert.IsFalse(doubleEdgedPipes.ContainsKey(key)); mockBuilderObject.Verify(mock => mock.Delete(), Times.Once()); }
public void CheckIfShipComponentIsDeletedCorrectly() { var position = new Coordinate(1, 3); shipComponents.Add(position, mockShipComponent.Object); blueprintBuilderViewModel.ShipComponentDeleted(mockBlueprint.Object, position); mockShipComponent.Verify(component => component.Delete(), Times.Once()); Assert.IsFalse(shipComponents.ContainsKey(position)); }
public void CheckIfObjectIsDeletedFromView() { var position = new Coordinate(2, 3); blocks.Add(position, mockBlock.Object); blueprintBuilderViewModel.BlockDeleted(mockBlueprint.Object, position); mockBlock.Verify(block => block.Delete(), Times.Once()); Assert.IsFalse(blocks.ContainsKey(position)); }
public bool HasPipeLink(CoordinatePair edge) { return(pipeLinks.ContainsKey(edge)); }