public async Task GetServiceInfo_AuthenticationProviderAlreadySet()
        {
            var authenticationProvider = new MockAuthenticationProvider();

            this.serviceInfoProvider = new AdalServiceInfoProvider(authenticationProvider.Object);
            var serviceInfo = await this.serviceInfoProvider.GetServiceInfo(
                this.appConfig,
                this.credentialCache.Object,
                this.httpProvider.Object,
                ClientType.Business);

            Assert.IsNotInstanceOfType(serviceInfo.AuthenticationProvider, typeof(AdalAuthenticationProvider), "Unexpected authentication provider type.");
            Assert.AreEqual(authenticationProvider.Object, serviceInfo.AuthenticationProvider, "Unexpected authentication provider set.");
        }
        public void Setup()
        {
            this.appConfig = new BusinessAppConfig
            {
                ActiveDirectoryAppId           = "12345",
                ActiveDirectoryReturnUrl       = "https://localhost/return",
                ActiveDirectoryServiceResource = "https://resource/",
            };

            this.credentialCache     = new MockAdalCredentialCache();
            this.httpProvider        = new MockHttpProvider(null);
            this.serviceInfoProvider = new AdalServiceInfoProvider {
                UserSignInName = "12345"
            };
        }