Mercurial > repos > IBBoard.Ini.Tests
diff IniFileReaderTest.cs @ 12:0be17f8102ed
* Fix unit test paths
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 07 Nov 2012 20:22:20 +0000 |
parents | 4f281289bcdd |
children |
line wrap: on
line diff
--- a/IniFileReaderTest.cs Wed Jan 26 20:01:45 2011 +0000 +++ b/IniFileReaderTest.cs Wed Nov 07 20:22:20 2012 +0000 @@ -1,7 +1,6 @@ // This file (IniFileReaderTest.cs) is a part of the IBBoard.Ini.Tests library and is copyright 2009 IBBoard. // // The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license. - using System; using System.IO; using NUnit.Framework; @@ -66,7 +65,7 @@ } } - Assert.IsTrue(found, "Did not find "+key); + Assert.IsTrue(found, "Did not find " + key); } } @@ -114,15 +113,14 @@ [Test()] public void TestIniFileReaderReturnsEmptyObjectForEmptyIniFile() { - IniFile file = IniFileReader.ReadFile(new FileInfo("EmptyFile.ini")); + IniFile file = IniFileReader.ReadFile(new FileInfo("TestData/EmptyFile.ini")); Assert.AreEqual(0, file.Sections.Length); } - [Test()] public void TestIniFileReaderContainsExpectedSectionForSingleSectionIniFile() { - IniFile file = IniFileReader.ReadFile(new FileInfo("SingleSectionSingleLine.ini")); + IniFile file = IniFileReader.ReadFile(new FileInfo("TestData/SingleSectionSingleLine.ini")); Assert.AreEqual(1, file.Sections.Length); Assert.IsTrue(file.HasSection("ASection")); Assert.IsNotNull(file["ASection"]); @@ -133,7 +131,7 @@ [Test()] public void TestIniFileReaderContainsExpectedSectionForSingleSectionIniFileWithContent() { - IniFile file = IniFileReader.ReadFile(new FileInfo("SingleSectionWithContent.ini")); + IniFile file = IniFileReader.ReadFile(new FileInfo("TestData/SingleSectionWithContent.ini")); Assert.AreEqual(1, file.Sections.Length); Assert.IsTrue(file.HasSection("ASection")); Assert.IsNotNull(file["ASection"]); @@ -144,7 +142,7 @@ [Test()] public void TestIniFileReaderContainsExpectedSectionsForTwoSectionIniFileWithContent() { - IniFile file = IniFileReader.ReadFile(new FileInfo("DoubleSectionWithContent.ini")); + IniFile file = IniFileReader.ReadFile(new FileInfo("TestData/DoubleSectionWithContent.ini")); Assert.AreEqual(2, file.Sections.Length); Assert.IsTrue(file.HasSection("ASection")); Assert.IsNotNull(file["ASection"]); @@ -159,7 +157,7 @@ [Test()] public void TestIniFileReaderContainsExpectedSectionForSingleSectionIniFileWithMultiLineContent() { - IniFile file = IniFileReader.ReadFile(new FileInfo("SingleSectionWithMultiLineContent.ini")); + IniFile file = IniFileReader.ReadFile(new FileInfo("TestData/SingleSectionWithMultiLineContent.ini")); Assert.AreEqual(1, file.Sections.Length); Assert.IsTrue(file.HasSection("ASection")); IniSection section = file["ASection"]; @@ -182,14 +180,14 @@ } } - Assert.IsTrue(found, "Did not find "+key); + Assert.IsTrue(found, "Did not find " + key); } } [Test()] public void TestIniFileReaderContainsExpectedSectionWhenFilePaddedAtStart() { - IniFile file = IniFileReader.ReadFile(new FileInfo("StartPadded.ini")); + IniFile file = IniFileReader.ReadFile(new FileInfo("TestData/StartPadded.ini")); Assert.AreEqual(1, file.Sections.Length); Assert.IsTrue(file.HasSection("ASection")); Assert.IsNotNull(file["ASection"]); @@ -200,7 +198,7 @@ [Test()] public void TestIniFileReaderContainsExpectedSectionsForTwoConsecutiveSectionSectionsInFile() { - IniFile file = IniFileReader.ReadFile(new FileInfo("ConsecutiveSection.ini")); + IniFile file = IniFileReader.ReadFile(new FileInfo("TestData/ConsecutiveSection.ini")); Assert.AreEqual(2, file.Sections.Length); Assert.IsTrue(file.HasSection("SectionA")); Assert.IsNotNull(file["SectionA"]);