public void ReturnFalseForMissingCustomData()
        {
            IAccount testAccount = null;

            using (new AutoCleanup(_fixture.Client, async c =>
            {
                testAccount = await _fixture.TestDirectory.CreateAccountAsync(NewTestAccount(c));
                return(new IResource[] { testAccount });
            }))
            {
                var filter = new RequireCustomDataFilter("foobar", true);
                filter.IsAuthorized(testAccount).Should().BeFalse();
            }
        }
        public void ReturnTrueForMatchingCustomDataWithComparer()
        {
            IAccount testAccount = null;

            using (new AutoCleanup(_fixture.Client, async c =>
            {
                testAccount = await _fixture.TestDirectory.CreateAccountAsync(NewTestAccount(c));
                testAccount.CustomData["foobar"] = 123.456f;
                await testAccount.SaveAsync();
                return(new IResource[] { testAccount });
            }))
            {
                var filter = new RequireCustomDataFilter("foobar", 123.456f, new RoundingFloatComparer());
                filter.IsAuthorized(testAccount).Should().BeTrue();
            }
        }
        public void ReturnFalseForNullAccount()
        {
            var filter = new RequireCustomDataFilter("foobar", true);

            filter.IsAuthorized(null).Should().BeFalse();
        }