public void GetWeightNames_DatasetNameIsEmpty() { try { NetworkAnalyst networkAnalyst = new NetworkAnalyst("http://" + ip + ":8090/iserver/services/transportationanalyst-sample/rest"); List<string> turnWeightNames = networkAnalyst.GetWeightNames(""); } catch (ArgumentNullException exception) { Assert.IsTrue(exception.ParamName == "networkDatasetName"); } }
public void GetWeightNames() { NetworkAnalyst networkAnalyst = new NetworkAnalyst("http://" + ip + ":8090/iserver/services/transportationanalyst-sample/rest"); List<string> turnWeightNames = networkAnalyst.GetWeightNames("RoadNet@Changchun"); Assert.IsNotNull(turnWeightNames); Assert.IsTrue(turnWeightNames.Count == 2); Assert.IsTrue(turnWeightNames[0] == "length"); Assert.IsTrue(turnWeightNames[1] == "time"); }