public void MergePolyLineTest() { var mergePolyLine = GoogleFunctions.MergePolyLine(GoogleFunctionsTest.POLY_LINE, GoogleFunctionsTest.POLY_LINE_2); Assert.IsNotNull(mergePolyLine); Assert.AreEqual("chdEchdEoxgFoxgFi`vEi`vEe~|g@e~|g@ore}@ore}@izs|@izs|@", mergePolyLine); var decodePolyLine = GoogleFunctions.DecodePolyLine(mergePolyLine).ToArray(); Assert.IsNotNull(decodePolyLine.FirstOrDefault()); Assert.AreEqual(6, decodePolyLine.Length); Assert.AreEqual(decodePolyLine[0].LocationString, location1.LocationString); Assert.AreEqual(decodePolyLine[1].LocationString, location2.LocationString); Assert.AreEqual(decodePolyLine[2].LocationString, location3.LocationString); Assert.AreEqual(decodePolyLine[3].LocationString, location4.LocationString); Assert.AreEqual(decodePolyLine[4].LocationString, location5.LocationString); Assert.AreEqual(decodePolyLine[5].LocationString, location6.LocationString); }
public void MergePolyLineWhenEncdodedLocationsIsNullTest() { var exception = Assert.Throws <ArgumentNullException>(() => GoogleFunctions.MergePolyLine(null)); Assert.AreEqual("encodedLocations", exception.ParamName); }