Ejemplo n.º 1
0
        public void DisposingTwoTimesShouldBeOk()
        {
            var query = new CustomQuery <SingleKeyParentTable>(this.Fixture.Connector, this.Fixture.SelectClause);

            query.Dispose();
            query.Dispose();
        }
Ejemplo n.º 2
0
        public void DisposingTwoTimesShouldBeOk()
        {
            var query = new CustomQuery <SingleKeyParentTable>(Fixture.Connector, Fixture.SelectClause);

            var result = query.Execute();

            query.Dispose();
            query.Dispose();
        }
Ejemplo n.º 3
0
        public void ShouldNotUseDisposedQueryObject()
        {
            var query = new CustomQuery <SingleKeyParentTable>(this.Fixture.Connector, this.Fixture.SelectClause);

            query.Dispose();

            Action executeQuery = () => query.Execute();

            executeQuery.ShouldThrow <NullReferenceException>();
        }
Ejemplo n.º 4
0
        public void QueryObjectMustBeReutilizable()
        {
            var query = new CustomQuery <SingleKeyParentTable>(Fixture.Connector, Fixture.SelectClause);

            var result  = query.Execute();
            var result2 = query.Execute();

            result.Should().NotBeNull();
            result2.Should().NotBeNull();
            result2.Should().HaveSameCount(result);

            query.Dispose();
        }