mercredi 30 mai 2018

Testing processFilePath NUnit C#

I've written a test using NUnit Testcase. I've defined the file name 'irm_xxx_tbbmf_xu.csv.ovr' and what data i expect that file to output.

I've defined my processFilePath of the location of where that file will be and the file name within [NUnit.Framework.TestCase("irm_xxx_tbbmf_xu.csv.ovr".

My question is the way i've written the processFilePath will it find the file name from the [NUnit.Framework.TestCase as i expect it to. And will the Assert.AreEqual work the way i've written it.

      [NUnit.Framework.TestCase("irm_xxx_tbbmf_xu.csv.ovr", "6677,6677_6677,3001,6")]
    [NUnit.Framework.TestCase("irm_xxx_tbbmf_xxx.csv.ovr", "6677,22,344")]
    public void ValidateInventoryMeasurement(string path, string expected)
    {
        var processFilePath = "/orabin/product//inputs//actuals/";
        var actual = Common.LinuxCommandExecutor.
            RunLinuxcommand("cat " + path);

        Assert.AreEqual(expected, actual);
    }

Aucun commentaire:

Enregistrer un commentaire