コード例 #1
0
        public void OutingRepository_GetTotalCost_ShouldReturnTotalCost()
        {
            //Arrange
            List <Outings> outingsList = _outingsRepository.GetOutingsList();

            Outings outings = new Outings();

            outings.TotalCostEvent = 1000m;
            _outingsRepository.AddOutingsToList(outings);

            Outings outingsTwo = new Outings();

            outingsTwo.TotalCostEvent = 500m;
            _outingsRepository.AddOutingsToList(outingsTwo);

            Outings outingsThree = new Outings();

            outingsThree.TotalCostEvent = 250m;
            _outingsRepository.AddOutingsToList(outingsThree);

            //Act
            decimal actual   = _outingsRepository.GetTotalCost();
            decimal expected = 1750m;

            //Assert
            Assert.AreEqual(expected, actual);
        }