Inheritance: Asn1Encodable
Ejemplo n.º 1
0
		private void checkConstruction(
			Restriction		restriction,
			DirectoryString	res)
		{
			checkValues(restriction, res);

			restriction = Restriction.GetInstance(restriction);

			checkValues(restriction, res);

			Asn1InputStream aIn = new Asn1InputStream(restriction.ToAsn1Object().GetEncoded());

			IAsn1String str = (IAsn1String) aIn.ReadObject();

			restriction = Restriction.GetInstance(str);

			checkValues(restriction, res);
		}
Ejemplo n.º 2
0
		public override void PerformTest()
		{
			DirectoryString res = new DirectoryString("test");
			Restriction restriction = new Restriction(res.GetString());

			checkConstruction(restriction, res);

			try
			{
				Restriction.GetInstance(new Object());

				Fail("GetInstance() failed to detect bad object.");
			}
			catch (ArgumentException)
			{
				// expected
			}
		}
Ejemplo n.º 3
0
		private void checkValues(
			Restriction		restriction,
			DirectoryString	res)
		{
			checkMandatoryField("restriction", res, restriction.RestrictionString);
		}