public void CreateIdCardTest() { //Create factory SOSIFactory factory = CreateSOSIFactory(Global.MocesCprGyldig); //Create IdCard SystemIdCard idCard = factory.CreateNewSystemIdCard("ItSystem", new CareProvider(SubjectIdentifierType.medcomitsystemname, "TestSystem", "Trifork"), AuthenticationLevel.UsernamePasswordAuthentication, "user", "test123", null, "alt"); Assert.NotNull(idCard); }
public void IdCardNullCareProviderTest() { //Create factory SOSIFactory factory = CreateSOSIFactory(Global.MocesCprGyldig); //Create IdCard with missing UserInfo Assert.Throws <ModelException>(delegate { factory.CreateNewSystemIdCard("ItSystem", null, AuthenticationLevel.MocesTrustedUser, null, null, factory.GetCredentialVault().GetSystemCredentials(), "alt"); }); }
public void IdCardNullSystemInfoTest() { //Create factory SOSIFactory factory = CreateSOSIFactory(Global.MocesCprGyldig); //Create IdCard with missing UserInfo Assert.Throws <ModelException>(delegate { factory.CreateNewSystemIdCard("", new CareProvider(SubjectIdentifierType.medcomcvrnumber, "25520041", "TRIFORK SERVICES A/S // CVR:25520041"), AuthenticationLevel.MocesTrustedUser, null, null, factory.GetCredentialVault().GetSystemCredentials(), "alt"); }); }
public SystemIdCard CreateVocesSystemIdCard(SOSIFactory factory) { return(factory.CreateNewSystemIdCard("ItSystem", new CareProvider(SubjectIdentifierType.medcomcvrnumber, "25520041", "TRIFORK SERVICES A/S // CVR:25520041"), AuthenticationLevel.VocesTrustedSystem, null, null, factory.GetCredentialVault().GetSystemCredentials(), "alt")); }