Esempio n. 1
0
			public void ReturnsTrueWhenRecordsArePresent()
			{
				var reader = new FakeXsltReader();
				reader.Open("index");

				bool result = reader.Read();

				Assert.True(result);
			}
Esempio n. 2
0
			public void ReturnsFalseWhenNoRecordsPresent()
			{
				var reader = new FakeXsltReader();
				reader.Open("emptyindex");

				bool result = reader.Read();

				Assert.False(result);
			}
Esempio n. 3
0
			public void ReturnsNullWhenFieldDoesntExist()
			{			
				var reader = new FakeXsltReader();
				reader.Open("index");
				reader.Read();

				var result = reader.GetFieldValue("foo");
				
				Assert.Null(result);
			}
Esempio n. 4
0
			public void GetFieldValueReturnsStringWhenColumnExists()
			{
				var reader = new FakeXsltReader();
				reader.Open("index");
				reader.Read();

				var val = reader.GetFieldValue("batch_id");

				Assert.NotEqual(string.Empty, val);
			}
Esempio n. 5
0
			public void ReturnsStringWhenFieldExists()
			{
				var reader = new FakeXsltReader();
				reader.Open("index");
				reader.Read();

				var result = reader.GetFieldValue("batch_id");

				Assert.NotNull(result);
				Assert.IsType<string>(result);
			}
Esempio n. 6
0
		    public void ReturnsFalseWhenIndexNameCantBeMatchedToCsvFile()
			{
				var reader = new FakeXsltReader();
				bool result = reader.Open("foo");
				Assert.False(result);
		    }
Esempio n. 7
0
			public void ReturnsTrueWhenCsvFileNameMatchesIndex()
			{
				var reader = new FakeXsltReader();
				bool result = reader.Open("index");
				Assert.True(result);
			}