private void Button_ClickAddPermission(object sender, RoutedEventArgs e)
        {
            if (!string.IsNullOrEmpty(TextBox_PermissionName.Text))
            {
                Permission.Add(TextBox_PermissionName.Text);

                Permission = Permission;

                TextBox_PermissionName.Text = "";
            }
        }
        public void Add_WithPermissionValue_PermissionWithPermissionValue()
        {
            // Arrange
            var target          = new Permission <Policy>();
            var permissionValue = (BigInteger)Math.Pow(2, (int)Policy.Create);
            var expected        = permissionValue;
            var actual          = default(BigInteger);

            // Act
            actual = target.Add(permissionValue);

            // Assert
            Assert.AreEqual(expected, actual);
        }
        public void Add_WithPolicy_PermissionWithPolicy()
        {
            // Arrange
            const Policy policy   = Policy.Create;
            var          target   = new Permission <Policy>();
            var          expected = (BigInteger)Math.Pow(2, (int)policy);
            var          actual   = default(BigInteger);

            // Act
            actual = target.Add(policy);

            // Assert
            Assert.AreEqual(expected, actual);
        }