public void CannotCreateSelfConnection() { var grid = new ConnectionGrid(2); Action creatingASelfConnection = () => grid[1, 1] = true; Assert.That(() => creatingASelfConnection(), Throws.InvalidOperationException); }
public void PrepopulatingConstructorReturnsGridOfCorrectSize() { var size = 10; var grid = new ConnectionGrid(size); Assert.That(grid.Size, Is.EqualTo(size)); }
public void PrepopulatingConstructorReturnsUnConnectedGrid() { var size = 10; var grid = new ConnectionGrid(size); for (int i = 0; i < size; i++) { Assert.That(grid.FromConnectionsForEntry(i).Any(), Is.False); Assert.That(grid.ToConnectionsForEntry(i).Any(), Is.False); } }
public void Initialize(ConnectionGrid newGrid) { mainGrid = newGrid; Destroy(this.gameObject, lifeTime); }
public void SetNavigationGrid(ConnectionGrid newGrid) { mainGrid = newGrid; }
private void SelectAll_Click(object sender, RoutedEventArgs e) { ConnectionGrid.SelectAll(); }