Ejemplo n.º 1
0
        public void BlueSkyTest_Process()
        {
            // set-up
            InitializeFiles();

            // pre-conditions
            Assert.AreEqual(0, Service.Activities.Count);

            // exercise
            Processor.Process();

            // post-conditions
            Assert.AreEqual(3, Service.Activities.Count);

            Assert.AreEqual(new DateTime(2019, 11, 6), Service.Activities[0].Date);
            Assert.AreEqual("HEB, #4543", Service.Activities[0].Description);
            Assert.AreEqual("Supermarkets", Service.Activities[0].Category);
            Assert.AreEqual(43.26, Service.Activities[0].Amount);
            Assert.AreEqual(ActivityType.Purchase, Service.Activities[0].Type);

            Assert.AreEqual(new DateTime(2019, 11, 6), Service.Activities[1].Date);
            Assert.AreEqual("INTERNET PAYMENT", Service.Activities[1].Description);
            Assert.AreEqual("Payments and Credits", Service.Activities[1].Category);
            Assert.AreEqual(1000, Service.Activities[1].Amount);
            Assert.AreEqual(ActivityType.Payment, Service.Activities[1].Type);

            Assert.AreEqual(new DateTime(2019, 11, 7), Service.Activities[2].Date);
            Assert.AreEqual("Amazon", Service.Activities[2].Description);
            Assert.AreEqual("Merchandise", Service.Activities[2].Category);
            Assert.AreEqual(15.27, Service.Activities[2].Amount);
            Assert.AreEqual(ActivityType.Purchase, Service.Activities[2].Type);
        }
        public void Run()
        {
            CreditCardActivityProcessor processor = new CreditCardActivityProcessor(CreditCardService);

            processor.Process();
        }