示例#1
0
        public void RetreiveLatestDbvItemByPath()
        {
            var item = Repository.Checkout("/test/dummy.csv");

            Assert.IsNotNull(item);
            Assert.AreEqual("/test/dummy.csv", item.Name);
        }
        public override WebResponse GetResponse()
        {
            var item = _repository.Checkout(_requestUri.LocalPath, _requestUri.Port);

            if (item == null)
            {
                throw new WebException("Item not found", WebExceptionStatus.ProtocolError);
            }
            return(new DbvWebResponse(item));
        }
示例#3
0
        public void VerifyCheckoutRetreivesLatestOnly()
        {
            _repo.Checkin("/test/dummy.csv", Encoding.ASCII.GetBytes("ABCDEFG"), "First", "john doe");
            var rev = _repo.Checkin("/test/dummy.csv", Encoding.ASCII.GetBytes("ABCDEFG"), "Second", "jane doe");

            Assert.AreEqual(2, rev);

            var item = _repo.Checkout("/test/dummy.csv");

            Assert.IsNotNull(item);
            Assert.AreEqual(2, item.Revision);
            Assert.AreEqual("jane doe", item.Author);
        }