use github repo as central

This commit is contained in:
Jackson Tian
2019-01-09 14:07:33 +08:00
parent 9664fb1b00
commit bc0df2dcec
46 changed files with 1864 additions and 29 deletions

View File

@@ -0,0 +1,31 @@
#include "gtest/gtest.h"
#include "alibabacloud/core/ClientConfiguration.h"
using namespace std;
using namespace AlibabaCloud;
TEST(ClientConfiguration, basic) {
const std::string regionId = "cn-shanghai";
const std::string regionId_new = "cn-beijing";
const std::string endpoint = "ep-cn-shanghai";
const std::string hostname = "hostname";
const std::string user = "user";
const std::string password = "password";
uint16_t port = 12345;
const NetworkProxy proxy(NetworkProxy::Http, hostname, port, user, password);
ClientConfiguration config(regionId);
EXPECT_TRUE(config.regionId() == regionId);
config.setEndpoint(endpoint);
config.setProxy(proxy);
config.setRegionId(regionId_new);
EXPECT_TRUE(config.endpoint() == endpoint);
EXPECT_TRUE(config.regionId() == regionId_new);
EXPECT_TRUE(config.proxy().hostName() == hostname);
EXPECT_TRUE(config.proxy().port() == port);
EXPECT_TRUE(config.proxy().user() == user);
EXPECT_TRUE(config.proxy().password() == password);
}