Exemplo n.º 1
0
        public void Ctor_Flag()
        {
            var control = new ExtendedDNControl(ExtendedDNFlag.StandardString);

            Assert.True(control.IsCritical);
            Assert.Equal(ExtendedDNFlag.StandardString, control.Flag);
            Assert.True(control.ServerSide);
            Assert.Equal("1.2.840.113556.1.4.529", control.Type);

            Assert.Equal(new byte[] { 48, 132, 0, 0, 0, 3, 2, 1, 1 }, control.GetValue());
        }
Exemplo n.º 2
0
        public void Ctor_Flag()
        {
            var control = new ExtendedDNControl(ExtendedDNFlag.StandardString);

            Assert.True(control.IsCritical);
            Assert.Equal(ExtendedDNFlag.StandardString, control.Flag);
            Assert.True(control.ServerSide);
            Assert.Equal("1.2.840.113556.1.4.529", control.Type);

            var expected = (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) ? new byte[] { 48, 132, 0, 0, 0, 3, 2, 1, 1 } : new byte[] { 48, 3, 2, 1, 1 };

            Assert.Equal(expected, control.GetValue());
        }