public void TestInitialize()
        {
            IComputeProvider provider = Bootstrapper.CreateComputeProvider();
            Server           server   = provider.GetDetails(_server.Id);

            if (server.Status != ServerState.Active)
            {
                Assert.Inconclusive("Could not run test because the server is in the '{0}' state (expected '{1}').", server.Status, ServerState.Active);
            }
        }
        public void TestUpdateServer()
        {
            IComputeProvider provider = Bootstrapper.CreateComputeProvider();

            string newName = UserComputeTests.UnitTestServerPrefix + Path.GetRandomFileName() + "²";
            bool   updated = provider.UpdateServer(_server.Id, name: newName);

            Assert.IsTrue(updated);
            Server updatedServer = provider.GetDetails(_server.Id);

            Assert.AreEqual(_server.Id, updatedServer.Id);
            Assert.AreEqual(newName, updatedServer.Name);
            Assert.AreNotEqual(_server.Name, updatedServer.Name);
            _server = updatedServer;
        }
        public void TestGetDetails()
        {
            IComputeProvider     provider = Bootstrapper.CreateComputeProvider();
            IEnumerable <Server> servers  = UserComputeTests.ListAllServersWithDetails(provider);

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

            foreach (Server server in servers)
            {
                Assert.IsNotNull(server);
                Server details = provider.GetDetails(server.Id);
                Assert.AreEqual(server.AccessIPv4, details.AccessIPv4);
                Assert.AreEqual(server.AccessIPv6, details.AccessIPv6);
                //Assert.AreEqual(server.Addresses, details.Addresses);
                Assert.AreEqual(server.Created, details.Created);
                Assert.AreEqual(server.DiskConfig, details.DiskConfig);
                Assert.AreEqual(server.Flavor.Id, details.Flavor.Id);
                Assert.AreEqual(server.HostId, details.HostId);
                Assert.AreEqual(server.Id, details.Id);
                Assert.AreEqual(server.Image.Id, details.Image.Id);
                //Assert.AreEqual(server.Links, details.Links);
                Assert.AreEqual(server.Name, details.Name);
                Assert.AreEqual(server.PowerState, details.PowerState);
                //Assert.AreEqual(server.Progress, details.Progress);
                //Assert.AreEqual(server.Status, details.Status);
                //Assert.AreEqual(server.TaskState, details.TaskState);
                Assert.AreEqual(server.TenantId, details.TenantId);
                Assert.AreEqual(server.Updated, details.Updated);
                Assert.AreEqual(server.UserId, details.UserId);
                //Assert.AreEqual(server.VMState, details.VMState);
            }
        }