コード例 #1
0
        public void Get_WithInvalidName_ThrowsInvalidNameException(string name)
        {
            // Arrange
              var testManager = new MemoryContainerManager();

              // Act
              Assert.Throws<InvalidNameException>(() => testManager.Get(name));
        }
コード例 #2
0
        public void Get_WithNonExistentName_ReturnsNull()
        {
            // Arrange
              var testManager = new MemoryContainerManager();

              // Act
              var container = testManager.Get("foo");

              // Assert
              Assert.That(container, Is.Null);
        }
コード例 #3
0
        public void Get_WithExistingName_ReturnsContainerWithSpecifiedName(string name)
        {
            // Arrange
              var store = new Dictionary<string, IBlobContainer> {
                                                           { "foo", MockRepository.GenerateStub<IBlobContainer>() },
                                                           { "bar", MockRepository.GenerateStub<IBlobContainer>() }
                                                         };
              var testManager = new MemoryContainerManager(store);

              // Act
              var container = testManager.Get(name);

              // Assert
              Assert.That(container, Is.EqualTo(store[name]));
        }