public void Identify_most_suitable_link_station_for_position_should_return_empty_if_there_are_no_link_stations() { var gridConfiguration = new List <List <double> >(); var powerGrid = new PowerGrid(gridConfiguration); var linkStationWithPower = powerGrid.IdentifyMostSuitableLinkStationForPosition(new Position(0, 0)); Assert.AreEqual(default((LinkStation, double)), linkStationWithPower); }
public void Identify_most_suitable_link_station_for_position_should_throw_argument_exception_if_no_position_is_supplied() { var gridConfiguration = new List <List <double> >(); gridConfiguration.Add(new List <double>() { 0, 0, 1 }); var powerGrid = new PowerGrid(gridConfiguration); powerGrid.IdentifyMostSuitableLinkStationForPosition(null); }
public void Identify_most_suitable_link_station_for_position_should_identify_if_no_link_station_is_within_range() { var gridConfiguration = new List <List <double> >(); gridConfiguration.Add(new List <double>() { 0, 0, 1 }); gridConfiguration.Add(new List <double>() { 2, 2, 1 }); var powerGrid = new PowerGrid(gridConfiguration); var linkStationWithPower = powerGrid.IdentifyMostSuitableLinkStationForPosition(new Position(5, 5)); Assert.AreEqual(default((LinkStation, double)), linkStationWithPower); }
public void Identify_most_suitable_link_station_for_position_should_identify_the_power_of_most_suitable_link_station() { var gridConfiguration = new List <List <double> >(); gridConfiguration.Add(new List <double>() { 0, 0, 1 }); gridConfiguration.Add(new List <double>() { 2, 2, 2 }); var powerGrid = new PowerGrid(gridConfiguration); var linkStationWithPower = powerGrid.IdentifyMostSuitableLinkStationForPosition(new Position(2, 2)); Assert.AreEqual(4, linkStationWithPower.Item2); }