예제 #1
0
        public void GetMaterialTypesTest()
        {
            var list     = _service.GetSourceMaterialTypes(new SourceMaterialTypeLookupParameter(SourceMaterialTypeLookupParameter.Material, "en")).Result.ToList();
            var bacteria = list.FirstOrDefault(t => t.Id == "ctnBacteria");

            Assert.IsNotNull(bacteria);
            Assert.AreEqual("rootMaterialTypeTreeNode", bacteria.ParentId);
            Assert.AreEqual("Bacteria", bacteria.Name);
            Assert.AreEqual(1, bacteria.Level);
            Assert.AreEqual("rftMaterialTypeTreeNode", bacteria.ReferenceType);
            Assert.IsNotEmpty(list);

            Assert.Pass();
        }
예제 #2
0
 public async Task <IEnumerable <SourceMaterialTypeLookupItem> > GetSourceMaterialTypeLookup([FromBody] SourceMaterialTypeLookupParameter parameter)
 {
     return(await _dbService.GetSourceMaterialTypes(parameter));
 }