public async Task AtLegeHarAktivSuspansjonITillegg() { const int hprnummer = 123456789; var person = new TestLege(hprnummer).SuspenderTillegg(); channel.HentPersonAsync(Arg.Any <int>(), null).Returns(person); var repositorySut = new HprService(factory, logger); var result = await repositorySut.SjekkGodkjenning(hprnummer.ToString()); Assert.That(result, Is.False); }
public async Task AtLegeErSuspendert() { const int hprnummer = 123456789; var person = new TestLege(hprnummer).Suspender(); channel.HentPersonAsync(Arg.Any <int>(), null).Returns(person); var repositorySut = new HprService(factory, logger); repositorySut.LeggTilGodkjenteHelsepersonellkategori(Kodekonstanter.OId9060Lege); var result = await repositorySut.SjekkGodkjenning(hprnummer.ToString()); Assert.That(result, Is.False); }
public async Task AtViKanLasteEnPerson() { const int hprnummer = 123456789; var person = new TestLege(hprnummer); channel.HentPersonAsync(Arg.Any <int>(), null).Returns(person); var repositorySut = new HprService(factory, logger); repositorySut.LeggTilGodkjenteHelsepersonellkategori(Kodekonstanter.OId9060Lege); var result = await repositorySut.HentPerson(hprnummer.ToString()); Assert.That(result, Is.Not.Null); Assert.Multiple(() => { Assert.That(result.HPRNummer, Is.EqualTo(hprnummer)); Assert.That(result.FysiskeAdresser.Length, Is.EqualTo(1)); Assert.That(result.FysiskeAdresser[0].Gateadresse, Is.EqualTo(person.FysiskeAdresser[0].Gateadresse)); }); }