public void AddSplitConsolidationithBlankDescription()
        {
            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 <SplitConsolidationAddedEvent>())).Verifiable();

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

            var id = Guid.NewGuid();

            corporateActionList.AddSplitConsolidation(id, new Date(2000, 01, 01), "", 1, 2);

            corporateActionList.Should().SatisfyRespectively(

                first => first.Should().BeEquivalentTo(new
            {
                Id            = id,
                Stock         = stock,
                Date          = new Date(2000, 01, 01),
                Description   = "1 for 2 Stock Split",
                OriginalUnits = 1,
                NewUnits      = 2
            })

                );

            mockRepository.Verify();
        }
Ejemplo n.º 2
0
        public ICompositeActionBuilder AddSplitConsolidation(string description, int originalUnits, int newUnits)
        {
            _ChildActions.AddSplitConsolidation(Guid.NewGuid(), _Event.ActionDate, description, originalUnits, newUnits);

            return(this);
        }