public void TestInitialize()
        {
            GetDiscountValueRepo = MockRepository.GenerateStub<IGetDiscountValue>();
            GetDiscountValueRepo.Stub(r => r.GetItemFee(ItemTypes.Auction)).Return(25);

            GetDiscountValueRepo.Stub(r => r.GetItemFee(ItemTypes.BuyItNow)).Return(35);
            GetDiscountValueRepo.Stub(r => r.GetUsertypeDiscount(UserTypes.Company)).Return(15);
            GetDiscountValueRepo.Stub(r => r.GetUsertypeDiscount(UserTypes.Normal)).Return(10);
            GetDiscountValueRepo.Stub(r => r.GetEndDateDiscount(ItemTypes.Auction,DateTime.Today)).Return(10);

            FeeCalculationRepo = MockRepository.GenerateStub<ICalculateFee>();
            FeeCalculationRepo.Stub(r=>r.GetFee(UserTypes.Company, ItemTypes.Auction, 100,
                DateTime.Today, GetDiscountValueRepo)).Return(100);
        }
        public void TestInitialize()
        {
            GetDiscountValueRepo = MockRepository.GenerateStub<IGetDiscountValue>();
            FeeCalculationRepo = MockRepository.GenerateStub<ICalculateFee>();

            GetDiscountValueRepo.Stub(r => r.GetItemFee((ItemTypes)1)).
                Throw(new Exception("No ItemTypes found"));
            GetDiscountValueRepo.Stub(r => r.GetUsertypeDiscount((UserTypes)1)).
                Throw(new Exception("No UserTypes found"));
            GetDiscountValueRepo.Stub(r => r.GetEndDateDiscount((ItemTypes)1, DateTime.Today)).
                Throw(new Exception("No ItemTypes found"));

            FeeCalculationRepo.Stub(r => r.GetFee((UserTypes)1, ItemTypes.Auction, 50,
                DateTime.Today, null)).Throw(new Exception("Invalid input"));
        }
 public ProgramErrorTests()
 {
     GetDiscountValue = new GetDiscountValues();
     Calculatefee = new CalculateFee();
 }