public ApiConnect(string TokenApi, string loginClient, string urlDirect, AccepLanguage accepLanguage) { UserRequest = new UserRequest { AccepLanguage = accepLanguage, loginClient = loginClient, TokenApi = TokenApi }; UrlDirect = urlDirect; }
public ApiConnect(string TokenApi, string loginClient, AccepLanguage accepLanguage) { UserRequest = new UserRequest { AccepLanguage = accepLanguage, loginClient = loginClient, TokenApi = TokenApi }; UrlDirect = "api.direct.yandex.com"; }
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); }
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); }