Пример #1
0
        public void GetFundOfMandatesFromXML_ParameterNull()
        {
            string          fileName        = null;
            MandatesService mandatesService = new MandatesService();
            Action          act             = () => mandatesService.GetFundOfMandatesFromXML(fileName);

            act.Should().Throw <ArgumentNullException>()
            .And.Message.Should().Be("Parameter can not be null (Parameter 'fileName')");
        }
Пример #2
0
        public void GetFundOfMandatesFromXML_FileNotFound()
        {
            string          fileName        = Path.GetFullPath(@"TestData.xml");
            MandatesService mandatesService = new MandatesService();

            Action act = () => mandatesService.GetFundOfMandatesFromXML(fileName);

            act.Should().Throw <FileNotFoundException>()
            .And.Message.Should().Be("File doesnot exists.");
        }
Пример #3
0
        public void GetFundOfMandatesFromXML_Success()
        {
            string fileName = Path.GetFullPath(@"TestData/FundsOfMandatesData.xml");

            //string fileName = "C:\\Training\\Rabobank.Training.ClassLibrary.Tests\\TestData\\FundsOfMandatesData.xml";
            MandatesService mandatesService = new MandatesService();
            var             result          = mandatesService.GetFundOfMandatesFromXML(fileName);

            result.Should().NotBeEmpty("Should Not be Empty", result);
        }