public void GetVenueById_NonExistingValue_ShouldNotReturnValue(int venueId) { using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString())) { _iVenueDal = scope.Resolve <IVenueDal>(); var venueResult = _iVenueDal.GetVenueById(venueId); Assert.True(venueResult == null); } }
/// <summary> /// Select Venue by Venue Id /// </summary> /// <param name="venueId">int object</param> /// <returns>Json object</returns> public string GetVenueById(int venueId) { try { var venue = _iVenueDal.GetVenueById(venueId); return(JsonConvert.SerializeObject(venue)); } catch (Exception ex) { log.Error($"Exception in Method GetVenueById for id - {venueId}", ex); throw; } }