public void TestGetCoordinateReturnsNullWhenPlaceIsNull() { WaterBody waterbody = new WaterBody(); Assert.IsNull(waterbody.Place); Assert.IsNull(waterbody.GetCoordinate()); }
public void TestGetCoordinate() { double lat = 3.7; double lon = 7.3; WaterBody waterbody = new WaterBody(); waterbody.Place = new Place(); waterbody.Place.Latitude = lat; waterbody.Place.Longitude = lon; LatLngCoord coordinate = waterbody.GetCoordinate(); Assert.IsNotNull(coordinate); Assert.AreEqual(lat, coordinate.Latitude); Assert.AreEqual(lon, coordinate.Longitude); }