Example #1
0
 public void GetEntryPass()
 {
     try
     {
         var bucket = DataBucket.LoadDataBucket("TestBucket", "../../../Db/");
         var result = bucket.Get("TestKey1");
         Assert.IsTrue(result.Equals("This is test data for the document database."));
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }
Example #2
0
        public void AddEntryPass()
        {
            try
            {
                var bucket = DataBucket.LoadDataBucket("TestBucket", "../../../Db/");
                bucket.Add("TestKey1", "This is test data for the document database.");

                Assert.IsTrue(true);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }
Example #3
0
        public void AddEntryFail()
        {
            try
            {
                var bucket = DataBucket.LoadDataBucket("TestBucket", "../../../Db/");
                bucket.Add("TestKey1", "This is test data for the document database.");
                bucket.Add("TestKey1", "This is test data for the document database.");

                Assert.Fail("This should not be possible");
            }
            catch (Exception ex)
            {
                Assert.IsTrue(true);
            }
        }
Example #4
0
        public void LoadBucket()
        {
            var bucket = DataBucket.LoadDataBucket("TestBucket", "../../../Db/");

            Assert.IsTrue(bucket != null);
        }