public void should_do_nothing_when_successful()
        {
            var account = new MockCFAccount();

            account.CreateContainer("testcontainername");
            Assert.That(account.ContainerExists("testcontainername"), Is.True);
            account.DeleteContainer("testcontainername");

            Assert.That(account.ContainerExists("testcontainername"), Is.False);
        }
        public void should_throw_container_already_exists_exception()
        {
            var account = new MockCFAccount();

            Assert.That(account.ContainerExists("alreadyexistingcontainer"), Is.False);
            account.CreateContainer("alreadyexistingcontainer");
            Assert.That(account.ContainerExists("alreadyexistingcontainer"), Is.True);
            account.CreateContainer("alreadyexistingcontainer");

            Assert.Fail("Allowed CreateContainer to be called when container already existed");
        }
        public void should_give_you_container_instance_when_successful()
        {
            var account = new MockCFAccount();

            Assert.That(account.ContainerExists("testcontainername"), Is.False);
            IContainer container = account.CreateContainer("testcontainername");

            Assert.That(account.ContainerExists("testcontainername"), Is.True);
            Assert.That(container.Name, Is.EqualTo("testcontainername"));
            Assert.That(account.ContainerCount, Is.EqualTo(1));
            Assert.That(account.BytesUsed, Is.EqualTo(34));
        }
        public void should_throw_argument_null_exception_if_the_container_name_is_null()
        {
            var account = new MockCFAccount();

            account.ContainerExists(null);

            Assert.Fail("Allowed ContainerExists to be called with null parameter");
        }
示例#5
0
        public void should_give_you_container_instance_when_successful()
        {
            var account = new MockCFAccount();
            Assert.That(account.ContainerExists("testcontainername"), Is.False);
            IContainer container = account.CreateContainer("testcontainername");

            Assert.That(account.ContainerExists("testcontainername"), Is.True);
            Assert.That(container.Name, Is.EqualTo("testcontainername"));
            Assert.That(account.ContainerCount, Is.EqualTo(1));
            Assert.That(account.BytesUsed, Is.EqualTo(34));
        }
示例#6
0
        public void should_do_nothing_when_successful()
        {
            var account = new MockCFAccount();
            account.CreateContainer("testcontainername");
            Assert.That(account.ContainerExists("testcontainername"), Is.True);
            account.DeleteContainer("testcontainername");

            Assert.That(account.ContainerExists("testcontainername"), Is.False);
        }
示例#7
0
        public void should_throw_argument_null_exception_if_the_container_name_is_null()
        {
            var account = new MockCFAccount();
            account.ContainerExists(null);

            Assert.Fail("Allowed ContainerExists to be called with null parameter");
        }
示例#8
0
        public void should_throw_container_already_exists_exception()
        {
            var account = new MockCFAccount();
            Assert.That(account.ContainerExists("alreadyexistingcontainer"), Is.False);
            account.CreateContainer("alreadyexistingcontainer");
            Assert.That(account.ContainerExists("alreadyexistingcontainer"), Is.True);
            account.CreateContainer("alreadyexistingcontainer");

            Assert.Fail("Allowed CreateContainer to be called when container already existed");
        }