public void TestSupportedClaimWithGoodAudience()
        {
            var audience        = "TestAudience";
            var audienceChecker = new AudienceChecker(audience);

            Assert.DoesNotThrow(() => { audienceChecker.CheckClaim(audience); });
        }
        public void TestSupportedClaimWithEmptyAudience()
        {
            var audience        = "TestAudience";
            var audienceChecker = new AudienceChecker(audience);

            ValidationException ex = Assert.Throws <ValidationException>(
                () => { audienceChecker.CheckClaim(string.Empty); });

            Assert.That(ex.Message, Is.EqualTo("Invalid audience"));
        }
        public void TestSupportedClaimWithDifferentAudiences()
        {
            var audienceA = "TestAudienceA";
            var audienceB = "TestAudienceB";

            var audienceChecker = new AudienceChecker(audienceA);

            ValidationException ex = Assert.Throws <ValidationException>(
                () => { audienceChecker.CheckClaim(audienceB); });

            Assert.That(ex.Message, Is.EqualTo("Invalid audience"));
        }