public void GetComplexObject() { NodeMapper nodeMapper = new NodeMapper(); Order order= nodeMapper.Get<Order>(14); Assert.AreEqual(14, order.Id); Assert.AreEqual(2, order.OrderItems.Count); }
public void GetComplexObject() { NodeMapper nodeMapper = new NodeMapper(); Order order = nodeMapper.Get <Order>(14); Assert.AreEqual(14, order.Id); Assert.AreEqual(2, order.OrderItems.Count); }
public void GetEntityTest() { NodeMapper mapper = new NodeMapper(); Person person = mapper.Get <Person>(7); Console.WriteLine("Generated Id: " + person.Id.ToString()); Assert.AreNotEqual(0, person.Id); Assert.AreEqual("Sony", person.FirstName); }
public void Get_MyClassEntity_And_Update_Manager() { NodeMapper nodeMapper = new NodeMapper(); MyClass myClaz = nodeMapper.Get <MyClass>(29); Console.WriteLine("Get_MyClassEntity_And_Update_Manager: " + myClaz.GetType().ToString()); Manager manager = (Manager)myClaz.SelectedPerson; manager.OfficeName = "Product Development"; myClaz.SelectedPerson = manager; nodeMapper.Save <MyClass>(myClaz); MyClass myClazTmp = nodeMapper.Get <MyClass>(29); Manager managerTmp = (Manager)myClaz.SelectedPerson; Assert.AreEqual("Product Development", manager.OfficeName); }
public void DeleteEntityTest() { Person person = this.SaveTest(); NodeMapper mapper = new NodeMapper(); mapper.Delete <Person>(person); Person tryGetDeletedPerson = mapper.Get <Person>(person.Id); Assert.AreEqual(person.Id, tryGetDeletedPerson.Id); }
public void Get_MyClassEntity_With_Manager() { NodeMapper nodeMapper = new NodeMapper(); MyClass myClaz = nodeMapper.Get <MyClass>(29); Manager manager = (Manager)myClaz.SelectedPerson; Assert.IsNotNull(myClaz); Assert.IsNotNull(manager); Assert.AreEqual(29, myClaz.Id); Assert.AreEqual("Neo4jD", manager.OfficeName); }
public void GetOrder() { NodeMapper nodeMapper = new NodeMapper(); Order order = nodeMapper.Get<Order>(19); Assert.AreEqual(14, order.Id); foreach (OrderItem item in order.OrderItems) { Console.WriteLine(item.Id.ToString()); Product prod = item.Product; if (prod != null) Console.WriteLine(prod.ProductName); } Assert.AreEqual(2, order.OrderItems.Count); }
public void GetOrder() { NodeMapper nodeMapper = new NodeMapper(); Order order = nodeMapper.Get <Order>(19); Assert.AreEqual(14, order.Id); foreach (OrderItem item in order.OrderItems) { Console.WriteLine(item.Id.ToString()); Product prod = item.Product; if (prod != null) { Console.WriteLine(prod.ProductName); } } Assert.AreEqual(2, order.OrderItems.Count); }
public void CanReadNodeToDifferentEntity() { NodeMapper mapper = new NodeMapper(); Address address = mapper.Get <Address>(7); }
public void GetEntityTest() { NodeMapper mapper = new NodeMapper(); Person person = mapper.Get<Person>(7); Console.WriteLine("Generated Id: " + person.Id.ToString()); Assert.AreNotEqual(0, person.Id); Assert.AreEqual("Sony", person.FirstName); }
public void DeleteEntityTest() { Person person = this.SaveTest(); NodeMapper mapper = new NodeMapper(); mapper.Delete<Person>(person); Person tryGetDeletedPerson = mapper.Get<Person>(person.Id); Assert.AreEqual(person.Id, tryGetDeletedPerson.Id); }
public void CanReadNodeToDifferentEntity() { NodeMapper mapper = new NodeMapper(); Address address = mapper.Get<Address>(7); }