public void AddCapitalReturnWithBlankDescription()
        {
            var mockRepository = new MockRepository(MockBehavior.Strict);

            var stock = new Stock(Guid.NewGuid());

            stock.List("ABC", "ABC Pty Ltd", new Date(1974, 01, 01), false, AssetCategory.AustralianStocks);

            var events = mockRepository.Create <IEventList>();

            events.Setup(x => x.Add(It.IsAny <CapitalReturnAddedEvent>())).Verifiable();

            var corporateActionList = new CorporateActionList(stock, events.Object);

            var id = Guid.NewGuid();

            corporateActionList.AddCapitalReturn(id, new Date(2000, 01, 01), "", new Date(2000, 02, 01), 10.00m);

            corporateActionList.Should().SatisfyRespectively(

                first => first.Should().BeEquivalentTo(new
            {
                Id          = id,
                Stock       = stock,
                Date        = new Date(2000, 01, 01),
                Description = "Capital Return $10.00",
                PaymentDate = new Date(2000, 02, 01),
                Amount      = 10.00m
            })

                );

            mockRepository.Verify();
        }
Example #2
0
        public ICompositeActionBuilder AddCapitalReturn(string description, Date paymentDate, decimal amount)
        {
            _ChildActions.AddCapitalReturn(Guid.NewGuid(), _Event.ActionDate, description, paymentDate, amount);

            return(this);
        }