public void TestIfGetRatioOfAtoEThrowsArgumentExceptionWhenThereIsNoLetterE() { //Arrange var sutText = new FileContent(@"C:\Users\tomas\Dropbox\Codecool - C#\csharp-text-analyser-T5chrono\TextAnalser.Test\TestFiles\test_no_e_letter.txt"); var sutAnalysis = new StatisticalAnalysis(sutText.GetCharIterator()); //Assert Assert.Throws <ArgumentException>(() => sutAnalysis.GetRatioOfAtoE()); }
public void TestIfGetRatioOfAtoEReturnsProperRatio() { //Arrange var sutText = new FileContent(@"C:\Users\tomas\Dropbox\Codecool - C#\csharp-text-analyser-T5chrono\TextAnalser.Test\TestFiles\test_simple.txt"); var sutAnalysis = new StatisticalAnalysis(sutText.GetCharIterator()); //Act var actual_value = sutAnalysis.GetRatioOfAtoE(); //Assert Assert.Equal(1, actual_value); }