public void Should_Be_Able_To_Create_A_New_Data_Reader_With_Connection_And_Results() { // Arrange using (var sandbox = DataReaderTestsSandbox.Create()) { // Act var subject = new CrmDbDataReader(sandbox.FakeResultSet, sandbox.FakeCrmDbConnection); } }
public void Should_Be_Able_To_Get_Schema_Data_Table() { // Arrange using (var sandbox = DataReaderTestsSandbox.Create()) { var subject = ResolveTestSubjectInstance(); // Act var schema = subject.GetSchemaTable(); // Assert Assert.That(schema, Is.Not.Null); } }
public void Should_Close_Connection_When_Finished_Reading() { // Arrange using (var sandbox = DataReaderTestsSandbox.Create()) { var subject = ResolveTestSubjectInstance(); // Act foreach (var r in subject) { } // Assert sandbox.FakeCrmDbConnection.AssertWasCalled(o => o.Close(), options => options.Repeat.Once()); } }