public void GetEdgeIfMatchFailed() { var graph = Graph(); var createdGraph = CreateNewGraph(); var v1 = graph.InsertVertex <Person>(new Person { Age = 21, Name = "raoof hojat" }); var v2 = graph.InsertVertex <Person>(new Person { Age = 21, Name = "raoof hojat" }); var inserted = graph.InsertEdge <Follow>(new Follow { Followee = v1.Id, Follower = v2.Id }); var edgeInfo = db.FindDocumentInfo(inserted.Id); }
public void ParseBatchList() { using (var reader = GenerateReader(JsonSample.ListResult)) { var db = new ArangoDatabase(); var documentParser = new DocumentParser(db); BaseResult baseResult = null; var personList = documentParser.ParseBatchResult<Person>(reader, out baseResult); Assert.Equal(personList.Count, 2); Assert.Equal(personList[0].Age, 27); Assert.Equal(personList[0].Fullname, "raoof hojat"); Assert.Equal(personList[0].Height, 172); Assert.Equal(personList[1].Age, 7); Assert.Equal(personList[1].Fullname, "hojat raoof"); Assert.Equal(personList[1].Height, 721); var info1 = db.FindDocumentInfo(personList[0]); Assert.NotNull(info1.Document); Assert.Equal(info1.Id, "Person/KEY1"); Assert.Equal(info1.Key, "KEY1"); Assert.Equal(info1.Rev, "REV1"); var info2 = db.FindDocumentInfo(personList[1]); Assert.NotNull(info2.Document); Assert.Equal(info2.Id, "Person/KEY2"); Assert.Equal(info2.Key, "KEY2"); Assert.Equal(info2.Rev, "REV2"); Assert.Equal(baseResult.Code, 200); Assert.Equal(baseResult.Error, false); } }
public void ParseBatchList() { using (var reader = GenerateReader(JsonSample.ListResult)) { var db = new ArangoDatabase(); var documentParser = new DocumentParser(db); BaseResult baseResult = null; var personList = documentParser.ParseBatchResult <Person>(reader, out baseResult); Assert.Equal(2, personList.Count); Assert.Equal(27, personList[0].Age); Assert.Equal("raoof hojat", personList[0].Fullname); Assert.Equal(172, personList[0].Height); Assert.Equal(7, personList[1].Age); Assert.Equal("hojat raoof", personList[1].Fullname); Assert.Equal(721, personList[1].Height); var info1 = db.FindDocumentInfo(personList[0]); Assert.NotNull(info1.Document); Assert.Equal("Person/KEY1", info1.Id); Assert.Equal("KEY1", info1.Key); Assert.Equal("REV1", info1.Rev); var info2 = db.FindDocumentInfo(personList[1]); Assert.NotNull(info2.Document); Assert.Equal("Person/KEY2", info2.Id); Assert.Equal("KEY2", info2.Key); Assert.Equal("REV2", info2.Rev); Assert.Equal(200, baseResult.Code); Assert.False(baseResult.Error); } }
public void ParseBatchList() { using (var reader = GenerateReader(JsonSample.ListResult)) { var db = new ArangoDatabase(); var documentParser = new DocumentParser(db); BaseResult baseResult = null; var personList = documentParser.ParseBatchResult<Person>(reader, out baseResult); Assert.Equal(personList.Count, 2); Assert.Equal(personList[0].Age, 27); Assert.Equal(personList[0].Fullname, "raoof hojat"); Assert.Equal(personList[0].Height, 172); Assert.Equal(personList[1].Age, 7); Assert.Equal(personList[1].Fullname, "hojat raoof"); Assert.Equal(personList[1].Height, 721); var info1 = db.FindDocumentInfo(personList[0]); Assert.NotNull(info1.Document); Assert.Equal(info1.Id, "Person/KEY1"); Assert.Equal(info1.Key, "KEY1"); Assert.Equal(info1.Rev, "REV1"); var info2 = db.FindDocumentInfo(personList[1]); Assert.NotNull(info2.Document); Assert.Equal(info2.Id, "Person/KEY2"); Assert.Equal(info2.Key, "KEY2"); Assert.Equal(info2.Rev, "REV2"); Assert.Equal(baseResult.Code, 200); Assert.Equal(baseResult.Error, false); } }