Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagec#
[TestMethod]
[TestCategory("UnitTest"), TestCategory("MyPlan")]
public void MyPlanPdfContainerMapper_ConversionSuccessful()
{
	var mapper = new MyPlanPdfContainerMapper();

	MyPlanModel myPlan = _fixture.Create<MyPlanModel>();
	List<ActivityItemModel> activityItems = _fixture.Build<ActivityItemModel>().CreateMany().ToList();
	KC.AMS.Model.ServiceModel.PersonNameStructureType personName = _fixture.Create<KC.AMS.Model.ServiceModel.PersonNameStructureType>();

	var container = new MyPlanContainer(myPlan, activityItems, personName);
	var pdfContainer = new MyPlanPdfContainer(container, _fixture.Create<bool>(), _fixture.Create<bool>());

	var result = mapper.Convert(pdfContainer, _fixture.Create<bool>());
	Assert.IsNotNull(result);  // We don't check that all properties are converted correctly (because there are many), but just that the converter doesn't throw an exception
}


Self-contained

Det tilstræbes, at convertere laves, så de ikke behøver at kommunikere med andre komponenter eller gå i databasen. En converter bør være self-contained og modtage alle nødvendige data gennem dens offentlige metoder

WsrmConverter

For wsrmconvertere gælder stort set samme regelsæt som for serviceconvertere med den forskel, at der laves én converter per wsrm-besked. 

...