mercredi 30 mai 2018

Testing validations C#

Below i've pasted my code. I'm validating a measure. I've written code that will read a linux file. But if i wanted to pass multiple file names here would this be possible? so for example instead of my test just validating one file could i do a loop so it could ready multiple files in one go.

Once the file is being read and proceeded i return actualItemData. In my next method i want to make a call to this actualItemData so the data is published in my 'var actual'

   public string validateMeasurement
    {
        var processFilePath = **"/orabin/app/oracle/inputs/ff/ff/actuals/xx_ss_x.csv.ovr";**
        var actualItemData = Common.LinuxCommandExecutor.
            RunLinuxcommand("cat " + processFilePath);

        **return actualItemData;** 
    }

    public void validateInventoryMeasurementValue(string Data, string itemStatus)
    {

        var expected = '6677,6677_6677,3001,6';

        **var actual = actualItemData);**


        Assert.AreEqual(expected, actual);
    }

Aucun commentaire:

Enregistrer un commentaire