Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
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);
            }
        }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
 public EventStyleController(IEventStyleDal iEventStyleDal)
 {
     _iEventStyleDal = iEventStyleDal;
 }