public static FiksIOConfiguration CreateTestConfiguration( Guid integrasjonId, string integrasjonPassord, Guid kontoId, string privatNokkel, string issuer, X509Certificate2 certificate) { return(new FiksIOConfiguration( amqpConfiguration: AmqpConfiguration.CreateTestConfiguration(), apiConfiguration: ApiConfiguration.CreateTestConfiguration(), integrasjonConfiguration: new IntegrasjonConfiguration(integrasjonId, integrasjonPassord), kontoConfiguration: new KontoConfiguration(kontoId, privatNokkel), maskinportenConfiguration: CreateMaskinportenTestConfig(issuer, certificate))); }
public FiksIOConfiguration( KontoConfiguration kontoConfiguration, IntegrasjonConfiguration integrasjonConfiguration, MaskinportenClientConfiguration maskinportenConfiguration, ApiConfiguration apiConfiguration = null, AmqpConfiguration amqpConfiguration = null, KatalogConfiguration katalogConfiguration = null, FiksIOSenderConfiguration fiksIOSenderConfiguration = null, DokumentlagerConfiguration dokumentlagerConfiguration = null) { KontoConfiguration = kontoConfiguration; IntegrasjonConfiguration = integrasjonConfiguration; MaskinportenConfiguration = maskinportenConfiguration; ApiConfiguration = apiConfiguration ?? new ApiConfiguration(); AmqpConfiguration = amqpConfiguration ?? new AmqpConfiguration(ApiConfiguration.Host); KatalogConfiguration = katalogConfiguration ?? new KatalogConfiguration(ApiConfiguration); DokumentlagerConfiguration = dokumentlagerConfiguration ?? new DokumentlagerConfiguration(ApiConfiguration); FiksIOSenderConfiguration = fiksIOSenderConfiguration ?? new FiksIOSenderConfiguration( null, ApiConfiguration.Scheme, ApiConfiguration.Host, ApiConfiguration.Port); }