public void GetEventStyleById_NonExistingValue_ShouldNotReturnValue(int eventStyleId) { using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString())) { _iEventStyleDal = scope.Resolve <IEventStyleDal>(); var eventStyleResult = _iEventStyleDal.GetEventStyleById(eventStyleId); Assert.True(eventStyleResult == null); } }
public void GetEventStyles_GetAll_ShouldReturnListOfEventStyles() { using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString())) { _iEventStyleDal = scope.Resolve <IEventStyleDal>(); var eventStyleList = _iEventStyleDal.GetEventStyles(); Assert.True(eventStyleList.Count > 0); } }
public void SaveCurrency_DeleteExistingCurrency_ShouldDeleteSuccessfully(string eventStyleName) { using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString())) { _iEventStyleDal = scope.Resolve <IEventStyleDal>(); var eventResult = _iEventStyleDal.GetEventStyleByName(eventStyleName); eventResult = _iEventStyleDal.SaveEventStyle(eventResult, true); Assert.True(eventResult == null); } }
public void SaveEventStyle_SaveNewEvent_ShouldSaveSuccessfully(string name, string description) { using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString())) { _iEventStyleDal = scope.Resolve <IEventStyleDal>(); var currency = new EventStyle { Name = name, Description = description }; var currencyResult = _iEventStyleDal.SaveEventStyle(currency); Assert.True(currencyResult != null); } }
public EventStyleController(IEventStyleDal iEventStyleDal) { _iEventStyleDal = iEventStyleDal; }