[TestCaseSource(nameof(_authTestCases))]
public void AuthMethod_IsNotConfigurable(ConsumerConfig consumerConfig)
{
var e = Assert.Catch<ArgumentException>(() => consumerConfig.Configure(new KafkaOptions()),
"Configure authentication using KafkaOptions.");
Assert.That(e!.Message, Is.EqualTo("Configure authentication using KafkaOptions. (Parameter 'config')"));
}
private readonly static ConsumerConfig[] _authTestCases =
{
new (SecurityProtocol: SecurityProtocol.Plaintext),
new (SaslMechanism: SaslMechanism.Plain),
new (SaslOauthbearerConfig: ""),
new (SaslUsername: ""),
new (SaslPassword : ""),
new (EnableSslCertificateVerification: true)
};
req.withCredentials = true
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Origin: https://public.com
Vary: Origin
Set-Cookie: {CookieName}={CookieValue}; Max-Age=63072000; Path=/; SameSite=None; Domain=.3rdparty.com; HttpOnly; Secure
//main.js
angular.module("myApp", []);
//app.component.js
angular.module("myApp").component("body", {
controller: MyAppComponent,
template: '<a href="javascript:void(0)" ng-click="$ctrl.OnStart()">start</a><br /><a href="javascript:void(0)" ng-click="$ctrl.OnStop()">stop</a><my-timer start="$ctrl.start"></my-timer>'
});
function MyAppComponent() {
this.start = false;
this.OnStart = function () {
this.start = true;
};
this.OnStop = function () {
this.start = false;
}
}
//timer.component.js
angular.module("myApp").component("myTimer", {
controller: MyTimerComponent,
bindings: { start: "<" },
template: "<div>{{$ctrl.time}}</div>"
});
function MyTimerComponent($timeout) {
var _start, _cancel, _time = 0;
function OnTime() {
_cancel = $timeout(OnTime, 1000);
_time++;
}
function Start() {
if (_start) return
_start = true;
_cancel = $timeout(OnTime, 1000);
}
function Stop() {
if (_start) {
$timeout.cancel(_cancel);
_time = 0;
_start = false;
}
}
Object.defineProperty(this, "start", {
get: function () {
return _start;
},
set: function (value) {
if (_start != value) {
if (value)
Start();
else
Stop();
}
}
});
Object.defineProperty(this, "time", {
get: function () {
return _time;
}
});
this.$onDestroy = Stop;
}
function resolveComponent(resolver, snapshot) {
// TODO: vsavkin change to typeof snapshot.component === 'string' in beta2
if (snapshot.component && snapshot._routeConfig) {
return resolver.resolveComponent(snapshot.component);
}
else {
return Promise.resolve(null);
}
}
RuntimeCompiler.prototype.resolveComponent = function (component) {
if (isString(component)) {
return PromiseWrapper.reject(new BaseException$1("Cannot resolve component using '" + component + "'."), null);
}
return this.compileComponentAsync(component);
};
$scope.profile = ProfileFactory.getProfile($rootScope.token);
function getProfile(token) {
var profile = $resource('/loadProfile', {token:token, id_profile: '@id_profile'});
return profile.query();
}