예제 #1
0
        public void OnUnsubscribeAsync_ReturnsCompletedTask()
        {
            var policy = new AutomaticallyOverwriteRequiredSignerPolicy();

            var task = policy.OnSubscribeAsync(context: null);

            Assert.Same(Task.CompletedTask, task);
        }
예제 #2
0
        public void Constructor_InitializesProperties()
        {
            var policy = new AutomaticallyOverwriteRequiredSignerPolicy();

            Assert.Equal(nameof(AutomaticallyOverwriteRequiredSignerPolicy), policy.Name);
            Assert.Equal(nameof(AutomaticallyOverwriteRequiredSignerPolicy), policy.SubscriptionName);
            Assert.Equal(SecurityPolicyAction.AutomaticallyOverwriteRequiredSigner, policy.Action);
            Assert.Single(policy.Policies);
            Assert.Equal(nameof(AutomaticallyOverwriteRequiredSignerPolicy), policy.Policies.Single().Name);
            Assert.Equal(nameof(AutomaticallyOverwriteRequiredSignerPolicy), policy.Policies.Single().Subscription);
        }
예제 #3
0
        public void Evaluate_Throws()
        {
            var policy = new AutomaticallyOverwriteRequiredSignerPolicy();

            Assert.Throws <NotImplementedException>(() => policy.Evaluate(context: null));
        }