public void ShouldReturnSQL() { MockExtractOptions testOptions = new MockExtractOptions() { RecordCount = 10, }; IQueryProvider queryProvider = new QueryProvider(this.application, testOptions); string testSQL = queryProvider.FetchSupplierQuery(); Assert.NotEqual(0, testSQL.Length); }
public void ShouldNotIncludeRecordLimit() { MockExtractOptions testOptions = new MockExtractOptions() { RecordCount = 0, }; IQueryProvider queryProvider = new QueryProvider(this.application, testOptions); string testSQL = queryProvider.FetchSupplierQuery(); Assert.NotEqual(0, testSQL.Length); Assert.DoesNotContain("Top (@RecordCount)", testSQL); }