Exemplo n.º 1
0
        public void MergeOnUpdateNodes()
        {
            using (var client = new NeoClient(URL, USER, PASSWORD, CONFIG))
            {
                client.Connect();

                var user1 = new User()
                {
                    Email = "FakeEmail1", FirstName = "FakeFirstName1", LastName = "FakeLastName1"
                };
                var user2 = new User()
                {
                    Email = "FakeEmail2", FirstName = "FakeFirstName2", LastName = "FakeLastName2"
                };

                var entity = client.Add(user1);

                User result = client.Merge(
                    entityOnCreate: user1,
                    entityOnUpdate: user2,
                    $"Uuid:\"{entity.Uuid}\""
                    );

                result.Should().NotBeNull();
                result.Uuid.Should().Be(entity.Uuid);
            }
        }