コード例 #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);
        }