Esempio n. 1
0
        public void GetFacilityById_NonExistingValue_ShouldNotReturnValue(int facilityId)
        {
            using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString()))
            {
                _iFacilityDal = scope.Resolve <IFacilityDal>();

                var facilityResult = _iFacilityDal.GetFacilityById(facilityId);

                Assert.True(facilityResult == null);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Select Facility by FacilityId
 /// </summary>
 /// <param name="facilityId">int object</param>
 /// <returns>Json object</returns>
 public string GetFacilityById(int facilityId)
 {
     try
     {
         var facility = _iFacilityDal.GetFacilityById(facilityId);
         return(JsonConvert.SerializeObject(facility));
     }
     catch (Exception ex)
     {
         log.Error($"Exception in Method GetEventTypeById for id - {facilityId}", ex);
         throw;
     }
 }