public void TestNonExistingExtensionImageList()
        {
            var factory = new VirtualMachineExtensionImageFactory(client.Object);

            var list = factory.MakeList(
                nonExistingPublisherName,
                nonExistingExtensionName,
                "1.*");

            Assert.IsTrue(!list.Any());
        }
        public void TestMakeListWithoutClient()
        {
            var factory = new VirtualMachineExtensionImageFactory(null);

            var list = factory.MakeList(
                testPublisherName,
                testExtensionName,
                "1.*");

            Assert.IsTrue(!list.Any());
        }
        public void TestMakeListWithClient()
        {
            var factory = new VirtualMachineExtensionImageFactory(client.Object);

            var list = factory.MakeList(
                testPublisherName,
                testExtensionName,
                "1.*");

            Assert.IsTrue(list.Count() == 1);

            var item = list[0];

            Assert.AreEqual(
                item.Publisher,
                testPublisherName,
                true,
                string.Empty);

            Assert.AreEqual(
                item.Name,
                testExtensionName,
                true,
                string.Empty);

            Assert.IsTrue(!string.IsNullOrEmpty(item.ReferenceName));

            Assert.IsTrue(item.ResourceExtensionParameterValues == null
                      || !item.ResourceExtensionParameterValues.Any());

            Assert.IsTrue(string.IsNullOrEmpty(item.State));

            Assert.IsTrue(item.Version.Equals("1.*"));
        }