public void SetUp() { _miaEnvConfiguration = new MiaEnvsConfigurationsImpl { USERID_HEADER_KEY = "useridkey", USER_PROPERTIES_HEADER_KEY = "userpropskey", GROUPS_HEADER_KEY = "groupskey", CLIENTTYPE_HEADER_KEY = "clienttypekey", BACKOFFICE_HEADER_KEY = "backofficekey", MICROSERVICE_GATEWAY_SERVICE_NAME = "gateway-name" }; _serviceClientFactory = new ServiceClientFactory(_miaEnvConfiguration); var miaHeaders = new HeaderDictionary { { "useridkey", "_" }, { "userpropskey", "_" }, { "groupskey", "_" }, { "clienttypekey", "_" }, { "backofficekey", "_" }, { "gateway-name", "bar" }, }; var miaHeadersPropagator = new MiaHeadersPropagator(miaHeaders, _miaEnvConfiguration); ServiceClientFactory.SetMiaHeaders(miaHeadersPropagator); }
public void TestGetServiceProxyWithoutEnv() { var configWithoutMsGatewayName = new MiaEnvsConfigurationsImpl { USERID_HEADER_KEY = "useridkey", USER_PROPERTIES_HEADER_KEY = "userpropskey", GROUPS_HEADER_KEY = "groupskey", CLIENTTYPE_HEADER_KEY = "clienttypekey", BACKOFFICE_HEADER_KEY = "backofficekey", MICROSERVICE_GATEWAY_SERVICE_NAME = "" }; var factory = new ServiceClientFactory(configWithoutMsGatewayName); var result = factory.GetServiceProxy(new InitServiceOptions()); Check.That(result).IsNull(); }