-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1930 lument mucosa transporter
* WIP #1930 lumen mucosa * Fixes #1930 lument mucosa transporter * Fixes #1930 lument mucosa transporter
- Loading branch information
Showing
3 changed files
with
69 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
40 changes: 40 additions & 0 deletions
40
tests/PKSim.Tests/IntegrationTests/ProcessToProcessBuilderMapperSpecs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System.Linq; | ||
using OSPSuite.BDDHelper; | ||
using OSPSuite.BDDHelper.Extensions; | ||
using OSPSuite.Core.Domain; | ||
using PKSim.Core.Mappers; | ||
using PKSim.Core.Model; | ||
using PKSim.Infrastructure; | ||
|
||
namespace PKSim.IntegrationTests | ||
{ | ||
public abstract class concern_for_ProcessToProcessBuilderMapper : ContextWithLoadedProject<IProcessToProcessBuilderMapper> | ||
{ | ||
public override void GlobalContext() | ||
{ | ||
base.GlobalContext(); | ||
LoadProject("Mucosa_MultipleTransportDirections"); | ||
} | ||
} | ||
|
||
public class When_creating_a_simulation_using_transport_in_multiple_mucosa_directions : concern_for_ProcessToProcessBuilderMapper | ||
{ | ||
private Simulation _simulation; | ||
|
||
protected override void Context() | ||
{ | ||
base.Context(); | ||
var ind = FindByName<Individual>("I1"); | ||
var comp = FindByName<Compound>("C1"); | ||
var prot = FindByName<Protocol>("IV"); | ||
_simulation = DomainFactoryForSpecs.CreateSimulationWith(ind, comp, prot); | ||
} | ||
|
||
[Observation] | ||
public void should_not_create_too_many_transporters() | ||
{ | ||
var transportInLumenToMucosa = _simulation.Model.Neighborhoods.EntityAt<IContainer>("Lumen_lil_LowerIleum_cell", "C1", "T1-a"); | ||
transportInLumenToMucosa.GetChildren<IContainer>(x => x.ContainerType == ContainerType.Transport).Count().ShouldBeEqualTo(1); | ||
} | ||
} | ||
} |