public void GetDbInfoTest() { var expected = new DbInfo(); expected.Name = db1; expected.Version = "1.0.0"; expected.CRS = CRS.WGS84; var url = String.Join("/", new string[] { urlPrefix, db1 }); var handler = new MockHttpHandler(url, "GET", (req, res, param) => { var result = new RestResult(); result.Success = true; result.Data = JsonConvert.SerializeObject(expected); return(JsonConvert.SerializeObject(result)); }); mockServer.AddRequestHandler(handler); try { var db = new MapDB(db1); var actual = db.GetDbInfo(); Assert.AreEqual <DbInfo>(expected, actual); } catch { Assert.Fail(); } }