Пример #1
0
        public void SearchModelNoByKeywordFilterByManufacturer_ModelNoContains_1Result()
        {
            _instrumentService = InstrumentServiceFactory.CreateForSearch(_instrumentRepository);
            _instrumentService.Create(Guid.NewGuid(), "Bird", "DPI601IS", "None", "Digital Pressure Indicator", 0);
            _instrumentService.Create(Guid.NewGuid(), "Druck", "DPI601IS", "None", "Digital Pressure Indicator", 0);
            _instrumentService.Create(Guid.NewGuid(), "Fluke", "DruckDPI601", "None", "Digital Pressure Indicator", 0);

            var instruments = _instrumentService.SearchModelNoByKeywordFilterByManufacturer("dpi601", "Druck").ToList();

            Assert.AreEqual(1, instruments.Count);
            _instrumentRepository.DeleteAll();
        }
Пример #2
0
        public ActionResult SearchModelNumber(string modelNo, string manufacturer)
        {
            IEnumerable <string> returnedModelNo = _instrumentService.SearchModelNoByKeywordFilterByManufacturer(modelNo, manufacturer);

            return(Json(returnedModelNo));
        }