Exemplo n.º 1
0
        public void crlDistPointConstructorTest()
        {
            crlDistPoint target = new crlDistPoint();

            Assert.IsFalse(target.Critical);
            Assert.AreEqual("CrlDistributionPoints", target.Name);
            Assert.AreEqual("CRL Distribution Points", target.DisplayName);
        }
Exemplo n.º 2
0
        public void AddTest()
        {
            crlDistPoint    target = new crlDistPoint(true);
            OSCAGeneralName Name   = testInputGeneralName1;

            target.Add(Name);
            Assert.AreEqual(testInputGeneralName1, target.DistPoints[0]);
        }
Exemplo n.º 3
0
        public void RemoveTest()
        {
            crlDistPoint    target = new crlDistPoint(testInputXml);
            OSCAGeneralName Name   = testInputGeneralName1;

            target.Remove(Name);
            Assert.AreEqual(1, target.DistPoints.Count);
        }
Exemplo n.º 4
0
        public void CrlDistributionPointTest()
        {
            crlDistPoint target = new crlDistPoint(testInputXml);
            CrlDistPoint actual;

            actual = target.CrlDistributionPoint;
            Assert.IsInstanceOfType(actual, typeof(CrlDistPoint));
        }
Exemplo n.º 5
0
        public void DistPointsTest()
        {
            crlDistPoint           target = new crlDistPoint(testInputXml);
            List <OSCAGeneralName> actual;

            actual = target.DistPoints;
            Assert.AreEqual(testInputGeneralName1, actual[0]);
        }
Exemplo n.º 6
0
        public void crlDistPointConstructorTest2()
        {
            XElement     xml    = testInputXml;
            crlDistPoint target = new crlDistPoint(xml);

            Assert.IsTrue(target.Critical);
            Assert.AreEqual("CrlDistributionPoints", target.Name);
            Assert.AreEqual("CRL Distribution Points", target.DisplayName);
        }
Exemplo n.º 7
0
        public void crlDistPointConstructorTest1()
        {
            bool         Critical = true;
            crlDistPoint target   = new crlDistPoint(Critical);

            Assert.IsTrue(target.Critical);
            Assert.AreEqual("CrlDistributionPoints", target.Name);
            Assert.AreEqual("CRL Distribution Points", target.DisplayName);
        }
Exemplo n.º 8
0
        public void ToXmlTest()
        {
            crlDistPoint target   = new crlDistPoint(testInputXml);
            XNode        expected = testInputXml;
            XNode        actual;

            actual = target.ToXml();
            Assert.AreEqual(expected.ToString(), actual.ToString());
        }
Exemplo n.º 9
0
        // Load an existing extension
        private void edit(crlDistPoint cdp)
        {
            crlDP = cdp;

            // Populate the dataset
            for (int i = 0; i < cdp.DistPoints.Count; i++)
            {
                updateDataSet(cdp.DistPoints[i], i);
            }

            // critical setting
            if (crlDP.Critical)
            {
                cbCritical.Checked = true;
            }
            else
            {
                cbCritical.Checked = false;
            }
        }
Exemplo n.º 10
0
        public CrlDistributionPoint(crlDistPoint cdp)
        {
            InitializeComponent();

            // Setup the dataset
            ds.Tables.Add("generalNames");
            ds.Tables["generalNames"].Columns.Add("DP");
            ds.Tables["generalNames"].Columns.Add("Type");
            ds.Tables["generalNames"].Columns.Add("Name");

            // Setup the grid
            dgv.DataSource = ds.Tables["generalNames"];

            if (cdp == null)
            {
                create();
            }
            else
            {
                edit(cdp);
            }
        }
Exemplo n.º 11
0
 // Create a new extension
 private void create()
 {
     crlDP = new crlDistPoint();
 }