public void LinksAreRemovedSuccessfullyInMemory() { var jeremiah = Client.Get(TestBucket, Jeremiah).Value; var linkToRemove = new RiakLink(TestBucket, OJ, "ozzies"); jeremiah.RemoveLink(linkToRemove); var ojLinks = new List<RiakLink> { new RiakLink(TestBucket, OJ, "friends"), new RiakLink(TestBucket, OJ, "coworkers") }; jeremiah.Links.ShouldNotContain(linkToRemove); ojLinks.ForEach(l => jeremiah.Links.ShouldContain(l)); }
public void LinksAreRemovedAfterSaving() { var jeremiah = Client.Get(TestBucket, Jeremiah).Value; var linkToRemove = new RiakLink(TestBucket, OJ, "ozzies"); jeremiah.RemoveLink(linkToRemove); var result = Client.Put(jeremiah, new RiakPutOptions{ ReturnBody = true }); result.IsSuccess.ShouldBeTrue(); jeremiah = result.Value; var ojLinks = new List<RiakLink> { new RiakLink(TestBucket, OJ, "friends"), new RiakLink(TestBucket, OJ, "coworkers") }; jeremiah.Links.ShouldNotContain(linkToRemove); ojLinks.ForEach(l => jeremiah.Links.ShouldContain(l)); }
static RiakLink() { AllLinks = new RiakLink("", "", ""); }
public bool Equals(RiakLink other) { if(ReferenceEquals(null, other)) { return false; } if(ReferenceEquals(this, other)) { return true; } return Equals(other.Bucket, Bucket) && Equals(other.Key, Key) && Equals(other.Tag, Tag); }
public void RemoveLink(RiakLink link) { Links.Remove(link); }
public void RemoveLink(RiakObject riakObject, string tag) { var link = new RiakLink(riakObject.Bucket, riakObject.Key, tag); RemoveLink(link); }
public void RemoveLink(string bucket, string key, string tag) { var link = new RiakLink(bucket, key, tag); RemoveLink(link); }