public void SuccessfulIsWithinFiftyMilesOfDuluthTest() { var shipPositionsInFiftyMiles = new[] { new Position("ShipA", 46.737640, -92.138895), new Position("ShipB", 46.775274, -91.946634), new Position("ShipC", 46.734346, -91.766733), new Position("ShipD", 46.771041, -92.097696), new Position("ShipE", 46.731052, -92.068857), new Position("ShipF", 46.771290, -92.080787), new Position("ShipG", 46.753887, -92.079929), new Position("ShipH", 46.739889, -92.134861), new Position("ShipI", 46.944402, -91.116686) }; foreach (var position in shipPositionsInFiftyMiles) { var shipTest = new ShipTest { Position = position }; Assert.IsTrue( shipTest.IsWithinFiftyMilesOfDuluth() ); } }
public void SuccessfulIsWithinFiftyMilesOfDuluthTest() { var shipPositionsInFiftyMiles = new[] { new Position("ShipA", 46.737640, -92.138895) }; foreach (var position in shipPositionsInFiftyMiles) { var shipTest = new ShipTest { Position = position }; Assert.IsTrue( shipTest.IsWithinFiftyMilesOfDuluth() ); } }
public void SuccessfulIsNotWithinFiftyMilesOfDuluthTest() { var shipPositionsWayOut = new[] { new Position("ShipA", 48.306980, -87.162673), new Position("ShipB", 47.807653, -86.569412), new Position("ShipC", 47.109425, -85.031326), new Position("ShipD", 47.120640, -87.755935), new Position("ShipE", 47.984439, -88.294265) }; foreach (var position in shipPositionsWayOut) { var shipTest = new ShipTest { Position = position }; Assert.IsFalse( shipTest.IsWithinFiftyMilesOfDuluth() ); } }