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); }
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); }
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."); }
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')"); }