public void GetTransactionTypeByDescription_Should_Return_Null_WhenGiven_NotExistsDescription()
        {
            const string exceptedDescription = "NotExistsDescrip";

            _transTypeConfiguration.SetupMockEntityRepositoryForGetAll(_transTypeList);
            var transService = new TransactionService(_transTypeConfiguration.MockPersistence.Object, _transTypeConfiguration.MockLog.Object, _transTypeConfiguration.MockSecurity.Object);
            var returnValue = transService.GetTransactionTypeByDescription(exceptedDescription);
            _transTypeConfiguration.MockEntity.VerifyAll();
            Assert.IsNull(returnValue);
        }
        public void GetTransactionTypeByDescription_Should_Return_Valid_Data()
        {
            const string exceptedDescription = "Discount";
            const int actualValue = 10;

            _transTypeConfiguration.SetupMockEntityRepositoryForGetAll(_transTypeList);
            var transService = new TransactionService(_transTypeConfiguration.MockPersistence.Object, _transTypeConfiguration.MockLog.Object, _transTypeConfiguration.MockSecurity.Object);
            var returnValue = transService.GetTransactionTypeByDescription(exceptedDescription);
            _transTypeConfiguration.MockEntity.VerifyAll();

            Assert.IsNotNull(returnValue);
            Assert.AreEqual(returnValue.DisplayOrder, actualValue);
        }
 public void GetTransactionTypeByDescription_Should_Throw_WhenGiven_Invalid_Params()
 {
     const string invalidDescription = null;
     _transTypeConfiguration.SetupMockEntityRepositoryForGetAll(_transTypeList);
     var transService = new TransactionService(_transTypeConfiguration.MockPersistence.Object, _transTypeConfiguration.MockLog.Object, _transTypeConfiguration.MockSecurity.Object);
     transService.GetTransactionTypeByDescription(invalidDescription);
 }