Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Tests/LookupTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ public class LookupTests
[Test]
public void should_lookup_zip_code_by_coords()
{
var coordinate = Spatial.Search(-108.491240, 39.079600);
var coordinate = Spatial.Search(39.079600, -108.491240);

coordinate.Zip.ToString().ShouldEqual("81504");
coordinate.Latitude.ShouldEqual(-108.491247);
coordinate.Longitude.ShouldEqual(39.079602);
coordinate.Longitude.ShouldEqual(-108.491247);
coordinate.Latitude.ShouldEqual(39.079602);
}

[Test]
Expand All @@ -23,8 +23,8 @@ public void should_lookup_coords_by_zip_code()
var coordinate = Spatial.Search("81504");

coordinate.Zip.ToString().ShouldEqual("81504");
coordinate.Latitude.ShouldEqual(-108.491247);
coordinate.Longitude.ShouldEqual(39.079602);
coordinate.Longitude.ShouldEqual(-108.491247);
coordinate.Latitude.ShouldEqual(39.079602);
}

[Test]
Expand Down
2 changes: 1 addition & 1 deletion src/ZipCodeCoords/Spatial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ private static List<Coordinate> LoadCoordinates()
do
{
var zipCode = reader.ReadInt32();
var latitude = reader.ReadDouble();
var longitude = reader.ReadDouble();
var latitude = reader.ReadDouble();
coordinates.Add(new Coordinate(new ZipCode(zipCode), latitude, longitude));
} while (reader.BaseStream.Position < reader.BaseStream.Length);
}
Expand Down