コード例 #1
0
        public void Run()
        {
            IBonusReader reader = new FakeBonusReader();

            BonusProcessor processor = new BonusProcessor();
            processor.Load(FakeBonusReader.STOCKID, reader);

            Assert.IsTrue(processor.IsBonusListOnDate(new DateTime(2009, 1, 4)));
            Assert.IsTrue(processor.IsDividendDate(new DateTime(2009, 1, 3)));
            Assert.IsTrue(processor.IsExexDividendDate(new DateTime(2009, 1, 2)));

            Assert.IsNotNull(processor.FindBonus(new DateTime(2009, 1, 2)));
            Assert.IsNull(processor.FindBonus(new DateTime(2009, 1, 1)));
        }
コード例 #2
0
        public void Run()
        {
            IBonusReader reader = new FakeBonusReader();

            BonusProcessor processor = new BonusProcessor();

            processor.Load(FakeBonusReader.STOCKID, reader);

            Assert.IsTrue(processor.IsBonusListOnDate(new DateTime(2009, 1, 4)));
            Assert.IsTrue(processor.IsDividendDate(new DateTime(2009, 1, 3)));
            Assert.IsTrue(processor.IsExexDividendDate(new DateTime(2009, 1, 2)));

            Assert.IsNotNull(processor.FindBonus(new DateTime(2009, 1, 2)));
            Assert.IsNull(processor.FindBonus(new DateTime(2009, 1, 1)));
        }