Ejemplo n.º 1
0
    public void WriteFileTest()
    {
        NameSorter nameSorter = new NameSorter();

        nameSorter._nameList.Add(new PersonDetail {
            GivenName = "Elon", LastName = "Musk"
        });
        nameSorter._nameList.Add(new PersonDetail {
            GivenName = "Jeff", LastName = "Bezos"
        });
        nameSorter._nameList.Add(new PersonDetail {
            GivenName = "Bill", LastName = "Gates"
        });

        nameSorter.WriteFile("write-test.txt");
        var outputMD5 = GetMD5Checksum("write-test.txt");
        var baseMD5   = GetMD5Checksum(@"D:\CSharpPractice\GlobalX\unsorted-names-test.txt");

        Assert.Equal(baseMD5, outputMD5);
    }