public void should_return_only_objects_beginning_with_the_provided_substring()
        {
            var container = new MockCFContainer("testcontainername");
            container.AddObject(Constants.STORAGE_ITEM_NAME);
            Assert.That(container.ObjectExists(Constants.STORAGE_ITEM_NAME), Is.True);
            container.AddObject(Constants.HEAD_STORAGE_ITEM_NAME);
            Assert.That(container.ObjectExists(Constants.HEAD_STORAGE_ITEM_NAME), Is.True);

            string[] objectNames = container.GetObjectNames();
            Assert.That(objectNames.Length, Is.EqualTo(2));
            Assert.That(objectNames[0], Is.EqualTo(Constants.STORAGE_ITEM_NAME));
            Assert.That(objectNames[1], Is.EqualTo(Constants.HEAD_STORAGE_ITEM_NAME));

            var parameters = new Dictionary<GetListParameters, string>
            {{GetListParameters.Prefix, "h"}};
            objectNames = container.GetObjectNames(parameters);
            Assert.That(objectNames.Length, Is.EqualTo(1));
            Assert.That(objectNames[0], Is.EqualTo(Constants.HEAD_STORAGE_ITEM_NAME));

            parameters.Clear();
            parameters.Add(GetListParameters.Prefix, "t");
            objectNames = container.GetObjectNames(parameters);
            Assert.That(objectNames.Length, Is.EqualTo(1));
            Assert.That(objectNames[0], Is.EqualTo(Constants.STORAGE_ITEM_NAME));
        }
        public void should_return_only_objects_greater_than_the_marker_value()
        {
            var container = new MockCFContainer("testcontainername");
            container.AddObject(Constants.STORAGE_ITEM_NAME);
            Assert.That(container.ObjectExists(Constants.STORAGE_ITEM_NAME), Is.True);
            container.AddObject(Constants.HEAD_STORAGE_ITEM_NAME);
            Assert.That(container.ObjectExists(Constants.HEAD_STORAGE_ITEM_NAME), Is.True);

            string[] objectNames = container.GetObjectNames();
            Assert.That(objectNames.Length, Is.EqualTo(2));
            Assert.That(objectNames[0], Is.EqualTo(Constants.STORAGE_ITEM_NAME));
            Assert.That(objectNames[1], Is.EqualTo(Constants.HEAD_STORAGE_ITEM_NAME));

            var parameters = new Dictionary<GetListParameters, string>
            {{GetListParameters.Marker, "1"}};
            objectNames = container.GetObjectNames(parameters);
            Assert.That(objectNames.Length, Is.EqualTo(1));
            Assert.That(objectNames[0], Is.EqualTo(Constants.HEAD_STORAGE_ITEM_NAME));
        }
 public void should_delete_the_object()
 {
     var container = new MockCFContainer("testcontainername");
     container.AddObject(Constants.STORAGE_ITEM_NAME);
     Assert.That(container.ObjectExists(Constants.STORAGE_ITEM_NAME), Is.True);
     container.DeleteObject(Constants.STORAGE_ITEM_NAME);
     Assert.That(container.ObjectExists(Constants.STORAGE_ITEM_NAME), Is.False);
 }
 public void should_add_the_object()
 {
     var container = new MockCFContainer("testcontainername");
     container.AddObject(Constants.STORAGE_ITEM_NAME);
     Assert.That(container.ObjectExists(Constants.STORAGE_ITEM_NAME), Is.True);
     string[] objectNames = container.GetObjectNames();
     Assert.That(objectNames[0], Is.EqualTo(Constants.STORAGE_ITEM_NAME));
 }
 public void should_add_the_object()
 {
     var container = new MockCFContainer("testcontainername");
     container.AddObject(Constants.STORAGE_ITEM_NAME);
     Assert.That(container.ObjectExists(Constants.STORAGE_ITEM_NAME), Is.True);
     Assert.That(container.ObjectCount, Is.EqualTo(1));
     Assert.That(container.BytesUsed, Is.EqualTo(34));
 }