public void TestWithInvalidCredentialType()
 {
     IHDInsightSubscriptionCredentials credentials = new TestInvalidCredentials()
     {
         DeploymentNamespace = "hdinsight",
         Endpoint = new Uri("http://notrdfe.com/"),
         SubscriptionId = Guid.NewGuid()
     };
     Exception error = null;
     try
     {
         IHttpClientAbstraction invalidAbstraction =
             ServiceLocator.Instance.Locate<IHDInsightHttpClientAbstractionFactory>().Create(credentials, false);
         Assert.Fail("No Http client should be created with unsupported credential types");
     }
     catch (NotSupportedException e)
     {
         error = e;
     }
     Assert.IsNotNull(error);
 }
        public void TestWithInvalidCredentialType()
        {
            IHDInsightSubscriptionCredentials credentials = new TestInvalidCredentials()
            {
                DeploymentNamespace = "hdinsight",
                Endpoint            = new Uri("http://notrdfe.com/"),
                SubscriptionId      = Guid.NewGuid()
            };
            Exception error = null;

            try
            {
                IHttpClientAbstraction invalidAbstraction =
                    ServiceLocator.Instance.Locate <IHDInsightHttpClientAbstractionFactory>().Create(credentials, false);
                Assert.Fail("No Http client should be created with unsupported credential types");
            }
            catch (NotSupportedException e)
            {
                error = e;
            }
            Assert.IsNotNull(error);
        }