Beispiel #1
0
        public void CreateIsinFailsWhenInputHasIncorrectLength(string input)
        {
            var isinParser = new IsinParser();

            Action act = () => isinParser.ParseIsin(input);

            act.Should().Throw <Exception>()
            .WithMessage("Input has incorrect length");
        }
Beispiel #2
0
        public void CreateIsinWithValidInput(string input)
        {
            string country    = IsinHelper.ExtractCountry(input);
            string number     = IsinHelper.ExtractNumber(input);
            string checkDigit = IsinHelper.ExtractCheckDigit(input);
            var    isinParser = new IsinParser();

            var isin = isinParser.ParseIsin(input);

            isin.Country.Should().Be(country);
            isin.Number.Should().Be(number);
            isin.CheckDigit.Should().Be(checkDigit);
        }