Example #1
0
        public void DeleteIfMatchSuccedNoPurgeAsync()
        {
            var item = new TestData {
                Id = 4, Value = "A successful object PUT"
            };

            _orchestrate.Put(CollectionName, "4", item);
            var match = _orchestrate.Get(CollectionName, "4");

            var result = _orchestrate.DeleteIfMatchAsync(CollectionName, "4", match.Path.Ref, false).Result;

            Assert.IsTrue(result.Value == null || result.Value.ToString() == string.Empty);

            var graveyard = _orchestrate.Get(CollectionName, "4", match.Path.Ref.Replace("\"", string.Empty));

            Assert.IsTrue(graveyard.Value != null);
        }