public void CorrectlyReadsEnumeratedTextFileColumnByDisplayName()
        {
            string fileContents = "Persistence Mode\r\nLive\r\nArchive\r\n";

            MockRepository       mocks       = new MockRepository();
            IResourceFileLocator fileLocator = mocks.CreateMock <IResourceFileLocator>();

            Expect.Call(fileLocator.ReadTextFile("MyCompany.MyAssembly", _testDataFile)).Return(fileContents);

            mocks.ReplayAll();

            using (IDataFileReader reader = new DataFileReader(fileLocator))
            {
                reader.Open("MyCompany.MyAssembly", "Test", "DataFilePath");

                bool canRead = reader.Read();
                Assert.That(canRead, Is.EqualTo(true));
                Assert.That(reader.GetEnumerationByDisplayName <PersistenceMode>("Persistence Mode"), Is.EqualTo(PersistenceMode.Live));

                canRead = reader.Read();
                Assert.That(canRead, Is.EqualTo(true));
                Assert.That(reader.GetEnumerationByDisplayName <PersistenceMode>("Persistence Mode"), Is.EqualTo(PersistenceMode.Archive));

                canRead = reader.Read();
                Assert.That(canRead, Is.EqualTo(false));
            }

            mocks.VerifyAll();
        }
		public void CorrectlyReadsEnumeratedTextFileColumnByDisplayName()
		{
			string fileContents = "Persistence Mode\r\nLive\r\nArchive\r\n";

			MockRepository mocks = new MockRepository();
			IResourceFileLocator fileLocator = mocks.CreateMock<IResourceFileLocator>();
			Expect.Call(fileLocator.ReadTextFile("MyCompany.MyAssembly", _testDataFile)).Return(fileContents);

			mocks.ReplayAll();

			using (IDataFileReader reader = new DataFileReader(fileLocator))
			{
				reader.Open("MyCompany.MyAssembly", "Test", "DataFilePath");

				bool canRead = reader.Read();
				Assert.That(canRead, Is.EqualTo(true));
				Assert.That(reader.GetEnumerationByDisplayName<PersistenceMode>("Persistence Mode"), Is.EqualTo(PersistenceMode.Live));

				canRead = reader.Read();
				Assert.That(canRead, Is.EqualTo(true));
				Assert.That(reader.GetEnumerationByDisplayName<PersistenceMode>("Persistence Mode"), Is.EqualTo(PersistenceMode.Archive));

				canRead = reader.Read();
				Assert.That(canRead, Is.EqualTo(false));
			}

			mocks.VerifyAll();
		}