Ejemplo n.º 1
0
        public void CalculateMandates_CodeMatchFound()
        {
            MandatesService mandatesService = new MandatesService();

            List <Position>       position       = CreateMockPositionVM();
            List <FundOfMandates> fundOfMandates = CreateMockFundOfMandates();

            var result = mandatesService.CalculateMandates(position, fundOfMandates);

            result.Should().NotBeEmpty("Code Mandates found", result);
        }
Ejemplo n.º 2
0
        public void CalculateMandates_CodeMatchNotFound()
        {
            MandatesService mandatesService = new MandatesService();

            List <Position>       position       = CreateMockPositionVM_NoCodeMatch();
            List <FundOfMandates> fundOfMandates = CreateMockFundOfMandates();

            var result = mandatesService.CalculateMandates(position, fundOfMandates);

            result[0].Mandates.Should().BeNull("Code Mandates not found", result[0].Mandates);
        }
Ejemplo n.º 3
0
        public void CalculateMandates_LiquidityAllocation_GreaterThanZero()
        {
            MandatesService mandatesService = new MandatesService();

            List <Position>       position       = CreateMockPositionVM();
            List <FundOfMandates> fundOfMandates = CreateMockFundOfMandates();

            var result = mandatesService.CalculateMandates(position, fundOfMandates);

            result[1].Mandates.Should().HaveCount(4, "Liquidity Mandate Found.");
        }
Ejemplo n.º 4
0
        public void CalculateMandates_Null_Positions_Parameter()
        {
            MandatesService mandatesService = new MandatesService();

            List <Position>       position       = null;
            List <FundOfMandates> fundOfMandates = CreateMockFundOfMandates();

            Action act = () => mandatesService.CalculateMandates(position, fundOfMandates);

            act.Should().Throw <ArgumentNullException>()
            .And.Message.Should().Be("Parameter can not be null (Parameter 'positions')");
        }