[InlineData(-33.45773, -70.67095, "xuekEl|inL")] // Sandiego public void Polyliner_EncodeListWithOneElement_ShouldReturnExpectedPolyline(double latitude, double longitude, string expectedPolyline) { // arrange var polyliner = new Polyliner(); var points = new List <PolylinePoint> { new PolylinePoint(latitude, longitude) }; // act var result = polyliner.Encode(points); // assert Assert.NotNull(result); Assert.NotEmpty(result); Assert.Equal(expectedPolyline, result); }
public void Polyliner_EncodeGoogleExamples_ShouldReturnExpectedPolyline() { // arrange var polyliner = new Polyliner(); var points = new List <PolylinePoint> { new PolylinePoint(38.5, -120.2), new PolylinePoint(40.7, -120.95), new PolylinePoint(43.252, -126.453), }; // act var result = polyliner.Encode(points); // assert Assert.NotNull(result); Assert.NotEmpty(result); Assert.Equal(@"_p~iF~ps|U_ulLnnqC_mqNvxq`@", result); }