public void ReturnsTrueWhenRecordsArePresent() { var reader = new FakeXsltReader(); reader.Open("index"); bool result = reader.Read(); Assert.True(result); }
public void ReturnsFalseWhenNoRecordsPresent() { var reader = new FakeXsltReader(); reader.Open("emptyindex"); bool result = reader.Read(); Assert.False(result); }
public void ReturnsNullWhenFieldDoesntExist() { var reader = new FakeXsltReader(); reader.Open("index"); reader.Read(); var result = reader.GetFieldValue("foo"); Assert.Null(result); }
public void GetFieldValueReturnsStringWhenColumnExists() { var reader = new FakeXsltReader(); reader.Open("index"); reader.Read(); var val = reader.GetFieldValue("batch_id"); Assert.NotEqual(string.Empty, val); }
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); }
public void ReturnsFalseWhenIndexNameCantBeMatchedToCsvFile() { var reader = new FakeXsltReader(); bool result = reader.Open("foo"); Assert.False(result); }
public void ReturnsTrueWhenCsvFileNameMatchesIndex() { var reader = new FakeXsltReader(); bool result = reader.Open("index"); Assert.True(result); }