public void CanSaveAndLoadDocumentRelationObject() { var service = CreateService(); var utilObject = new DocumentRelationUtilObject { Key = "test" }; utilObject.DocumentIds.Add("första amdra"); utilObject.DocumentIds.Add("I like me neighbours"); service.SaveUtilObject(utilObject); var fetchedObject = service.GetUtilObject <DocumentRelationUtilObject>(utilObject.Key); fetchedObject.Should().NotBeNull(); fetchedObject.Key.Should().Be(utilObject.Key); fetchedObject.DocumentIds.Should().BeEquivalentTo(utilObject.DocumentIds); }
public void CanDeleteUtilObject() { var service = CreateService(); var utilObject = new DocumentRelationUtilObject { Key = Guid.NewGuid().ToString() }; utilObject.DocumentIds.Add("första amdra"); utilObject.DocumentIds.Add("I like me neighbours"); service.SaveUtilObject(utilObject); var fetchedObject = service.GetUtilObject <DocumentRelationUtilObject>(utilObject.Key); fetchedObject.Should().NotBeNull(); fetchedObject.Key.Should().Be(utilObject.Key); fetchedObject.DocumentIds.Should().BeEquivalentTo(utilObject.DocumentIds); service.DeleteUtilObject(utilObject.Key); fetchedObject = service.GetUtilObject <DocumentRelationUtilObject>(utilObject.Key); fetchedObject.Should().BeNull(); }