示例#1
0
        public void TestGetFlavor()
        {
            IComputeProvider            provider = Bootstrapper.CreateComputeProvider();
            IEnumerable <FlavorDetails> flavors  = ListAllFlavorsWithDetails(provider);

            Assert.IsNotNull(flavors);
            if (!flavors.Any())
            {
                Assert.Inconclusive("The test could not proceed because the specified account and/or region does not appear to contain any configured flavors.");
            }

            foreach (FlavorDetails flavor in flavors)
            {
                Assert.IsNotNull(flavor);
                FlavorDetails details = provider.GetFlavor(flavor.Id);
                Assert.AreEqual(flavor.Disabled, details.Disabled);
                Assert.AreEqual(flavor.DiskSizeInGB, details.DiskSizeInGB);
                Assert.AreEqual(flavor.Id, details.Id);
                //Assert.AreEqual(flavor.Links, details.Links);
                Assert.AreEqual(flavor.Name, details.Name);
                Assert.AreEqual(flavor.RAMInMB, details.RAMInMB);
                Assert.AreEqual(flavor.VirtualCPUCount, details.VirtualCPUCount);
            }
        }