コード例 #1
0
        public static void Init(TestContext context)
        {
            _testIdentity = new RackspaceCloudIdentity(Bootstrapper.Settings.TestIdentity);
            _testAdminIdentity = new RackspaceCloudIdentity(Bootstrapper.Settings.TestAdminIdentity);
            _testDomainIdentity = new RackspaceCloudIdentity(Bootstrapper.Settings.TestDomainIdentity);

            var provider = BuildProvider();

            _userDetails = provider.GetUserByName(_testIdentity.Username, _testIdentity);
            _adminUserDetails = provider.GetUserByName(_testAdminIdentity.Username, _testAdminIdentity);
        }
コード例 #2
0
        public static void Init(TestContext context)
        {
            _testIdentity = new RackspaceCloudIdentity(Bootstrapper.Settings.TestIdentity);

            var file = Path.Combine(Directory.GetCurrentDirectory(), saveFileNane1);
            if(File.Exists(file))
                File.Delete(file);

            file = Path.Combine(Directory.GetCurrentDirectory(), saveFileNane2);
            if (File.Exists(file))
                File.Delete(file);
        }
コード例 #3
0
        public void Should_Throw_Error_When_Authenticating_With_Invalid_Password()
        {
            var identity = new RackspaceCloudIdentity()
                               {
                                   Username = _testIdentity.Username,
                                   Password = "bad password"
                               };
            IIdentityProvider serviceProvider = new CloudIdentityProvider(identity);

            try
            {
                var userAccess = serviceProvider.Authenticate();

                throw new Exception("This code path is invalid, exception was expected.");
            }
            catch (net.openstack.Core.Exceptions.Response.ResponseException)
            {
                Assert.IsTrue(true);
            }
        }
コード例 #4
0
        public static void Init(TestContext context)
        {
            _testIdentity = new RackspaceCloudIdentity(Bootstrapper.Settings.TestIdentity);

        }