コード例 #1
0
 private PrescriptionLoader(TaskDataDocument taskDocument)
 {
     _taskDocument = taskDocument;
     _rootNode = _taskDocument.RootNode;
     _baseFolder = _taskDocument.BaseFolder;
     _prescriptions = new List<RasterGridPrescription>();
     _representationMapper = new RepresentationMapper();
 }
コード例 #2
0
        private static void AreEqual(XmlNode prnNode, ProductComponent productComponent, XmlNodeList productNodes, Catalog catalog, Dictionary<string, List<UniqueId>> linkList)
        {
            var productNode = FindMatchingProductNode(prnNode.GetXmlAttribute("A"), productNodes);
            if (productNode == null)
                return;

            var quantityDdi = Int32.Parse(productNode.GetXmlAttribute("E"));
            var uom = new RepresentationMapper().GetUnitForDdi(quantityDdi);
            Assert.AreEqual(uom, productComponent.Quantity.Value.UnitOfMeasure);
            Assert.AreEqual(prnNode.GetXmlAttribute("B"), productComponent.Quantity.Value.Value);

            var ingredient = catalog.Ingredients.Single(x => x.Id.ReferenceId == productComponent.IngredientId);
            Assert.AreEqual(productNode.GetXmlAttribute("B"), ingredient.Description);
        }
コード例 #3
0
 public void TearDown()
 {
     _representationMapper = null;
 }
コード例 #4
0
 public void Setup()
 {
     _representationMapper = new RepresentationMapper();
 }