Esempio n. 1
0
        public void constructorApiConnect4()
        {
            // Arrang

            AccepLanguage expected  = AccepLanguage.ru;
            string        expected1 = "Tester";
            string        expected2 = "10";
            string        expected3 = "api.direct.yandex.com";

            // Act
            API_Yandex_Direct.ApiConnect.ApiConnect apiConnect =
                new API_Yandex_Direct.ApiConnect.ApiConnect("10", "Tester", AccepLanguage.ru);

            // Assert
            Assert.AreEqual(expected, apiConnect.UserRequest.AccepLanguage);
            Assert.AreEqual(expected1, apiConnect.UserRequest.loginClient);
            Assert.AreEqual(expected2, apiConnect.UserRequest.TokenApi);
            Assert.AreEqual(expected3, apiConnect.UrlDirect);
        }
Esempio n. 2
0
        public void constructorApiConnect2()
        {
            // Arrang
            UserRequest userRequest = new UserRequest
            {
                AccepLanguage = AccepLanguage.ru,
                loginClient   = "Tester",
                TokenApi      = "10"
            };

            AccepLanguage expected  = AccepLanguage.ru;
            string        expected1 = "Tester";
            string        expected2 = "10";
            string        expected3 = "api.direct1.yandex.com";

            // Act
            API_Yandex_Direct.ApiConnect.ApiConnect apiConnect = new API_Yandex_Direct.ApiConnect.ApiConnect(userRequest, "api.direct1.yandex.com");

            // Assert
            Assert.AreEqual(expected, apiConnect.UserRequest.AccepLanguage);
            Assert.AreEqual(expected1, apiConnect.UserRequest.loginClient);
            Assert.AreEqual(expected2, apiConnect.UserRequest.TokenApi);
            Assert.AreEqual(expected3, apiConnect.UrlDirect);
        }