public void SalesRepoListIsInstantiated_ShouldSucceed()
        {
            //arrange
            var salesMember1 = new SalesMember("Danzig", 2500.25m);
            var salesMember2 = new SalesMember("Frankenstein", 3500.25m);


            //act
            _salesRepository.AddSalesMemberToList(salesMember1);
            _salesRepository.AddSalesMemberToList(salesMember2);

            var actual   = _salesRepository.GetListCount();
            var expected = 2;

            //assert
            Assert.AreEqual(expected, actual);
        }
        public void SalesTotal_ShouldSucceed()
        {
            //arrange
            var salesMember1 = new SalesMember("Danzig", 2500.25m);
            var salesMember2 = new SalesMember("Frankenstein", 3500.25m);


            //act
            _salesRepository.AddSalesMemberToList(salesMember1);
            _salesRepository.AddSalesMemberToList(salesMember2);

            var actual   = _salesRepository.AddTotalSales();
            var expected = 6000.50m;


            //assert
            Assert.AreEqual(expected, actual);
        }
Esempio n. 3
0
        public void GetTotalTeamSales_ShouldSucceed()
        {
            //Arrange
            _salesMember.TotalSalesForCurrentMonth = 200;
            _salesMemberRepo.AddMemberToList(_salesMember);
            SalesMember salesMember2 = new SalesMember {
                TotalSalesForCurrentMonth = 300
            };

            _salesMemberRepo.AddMemberToList(salesMember2);

            //Act
            var actualTotal   = _salesMemberRepo.GetTotalTeamSales();
            var expectedTotal = 500;

            //Assert
            Assert.AreEqual(expectedTotal, actualTotal);
        }
Esempio n. 4
0
 public void Arrange()
 {
     _salesMember           = new SalesMember("Smith", 123.41m);
     _salesMember2          = new SalesMember("Johnson", 456.62m);
     _salesMemberRepository = new SalesMemberRepository();
 }
Esempio n. 5
0
 public void Arrange()
 {
     _salesMember = new SalesMember();
 }