public override void PerformTest() { GeneralName name = new GeneralName(new X509Name("CN=hello world")); NamingAuthority auth = new NamingAuthority(new DerObjectIdentifier("1.2.3"), "url", new DirectoryString("fred")); Admissions admissions = new Admissions(name, auth, new ProfessionInfo[0]); checkConstruction(admissions, name, auth); admissions = Admissions.GetInstance(null); if (admissions != null) { Fail("null GetInstance() failed."); } try { Admissions.GetInstance(new Object()); Fail("GetInstance() failed to detect bad object."); } catch (ArgumentException) { // expected } }
private void checkValues( Admissions admissions, GeneralName name, NamingAuthority auth) { checkMandatoryField("admissionAuthority", name, admissions.AdmissionAuthority); checkMandatoryField("namingAuthority", auth, admissions.NamingAuthority); }
public virtual Admissions[] GetContentsOfAdmissions() { Admissions[] array = new Admissions[this.contentsOfAdmissions.Count]; for (int i = 0; i < this.contentsOfAdmissions.Count; i++) { array[i] = Admissions.GetInstance(this.contentsOfAdmissions[i]); } return(array); }
/** * @return Returns the contentsOfAdmissions. */ public virtual Admissions[] GetContentsOfAdmissions() { Admissions[] result = new Admissions[contentsOfAdmissions.Count]; for (int i = 0; i < contentsOfAdmissions.Count; ++i) { result[i] = Admissions.GetInstance(contentsOfAdmissions[i]); } return(result); }
private void checkConstruction( Admissions admissions, GeneralName name, NamingAuthority auth) { checkValues(admissions, name, auth); admissions = Admissions.GetInstance(admissions); checkValues(admissions, name, auth); Asn1InputStream aIn = new Asn1InputStream(admissions.ToAsn1Object().GetEncoded()); Asn1Sequence info = (Asn1Sequence)aIn.ReadObject(); admissions = Admissions.GetInstance(info); checkValues(admissions, name, auth); }
/** * @return Returns the contentsOfAdmissions. */ public virtual Admissions[] GetContentsOfAdmissions() { Admissions[] result = new Admissions[contentsOfAdmissions.Count]; for (int i = 0; i < contentsOfAdmissions.Count; ++i) { result[i] = Admissions.GetInstance(contentsOfAdmissions[i]); } return result; }