public void Valid_item_and_failed_IfMatch_throws_condition_failed() { TestContainer.Create(); Write(TestItem, Guid.Empty); ExpectConditionFailed(() => TryToRead(TestItem, StreamingCondition.IfMatch("asd"))); }
public void Valid_item_and_valid_IfMatch_wild_delete() { TestContainer.Create(); Write(TestItem, Guid.Empty); TestItem.Delete(StreamingCondition.IfMatch("*")); TestItem.GetInfo().ShouldFail(); }
public void Valid_item_and_failed_IfMatch_dont_delete() { TestContainer.Create(); Write(TestItem, Guid.Empty); TestItem.Delete(StreamingCondition.IfMatch("random")); TestItem.GetInfo().ShouldPass(); }
public void Valid_item_and_valid_match_wild_return() { TestContainer.Create(); var g = Guid.NewGuid(); Write(TestItem, g); ShouldHaveGuid(TestItem, g, StreamingCondition.IfMatch("*")); }
public void Valid_item_and_valid_IfMatch_exact_return() { TestContainer.Create(); var g = Guid.NewGuid(); Write(TestItem, g); var tag = TestItem.GetInfo().Value.ETag; ShouldHaveGuid(TestItem, g, StreamingCondition.IfMatch(tag)); }
public void Valid_item_and_valid_IfMatch_wild_returns_info() { TestContainer.Create(); Write(TestItem, Guid.Empty); TestItem.GetInfo(StreamingCondition.IfMatch("*")).ShouldPass(); }
public void Valid_item_and_failed_IfMatch_returns_empty() { TestContainer.Create(); Write(TestItem, Guid.Empty); TestItem.GetInfo(StreamingCondition.IfMatch("mismatch")).ShouldFail(); }
public void Failed_IfMatch_throws_condition_failed() { TestContainer.Create(); ExpectConditionFailed(() => Write(TestItem, Guid.Empty, StreamingCondition.IfMatch("tag"))); }
public void Missing_item_and_failed_IfMatch_throw_condition_failed() { TestContainer.Create(); ExpectConditionFailed(() => Write(TestItem, Guid.Empty, StreamingCondition.IfMatch("none"))); }
public void Missing_container_and_failed_IfMatch_throw_item_not_found() { ExpectContainerNotFound(() => Write(TestItem, Guid.Empty, StreamingCondition.IfMatch("none"))); }
public void Missing_item_and_IfMatch_throw_item_not_found() { TestContainer.Create(); ExpectItemNotFound(() => TryToRead(TestItem, StreamingCondition.IfMatch("mismatch"))); }
public void Missing_container_and_IfMatch_throw_container_not_found() { ExpectContainerNotFound(() => TryToRead(TestItem, StreamingCondition.IfMatch("mismatch"))); }
public void Missing_item_and_failed_IfMatch_work() { TestContainer.Create(); TestItem.Delete(StreamingCondition.IfMatch("some")); }