コード例 #1
0
        public void DisposingTwoTimesShouldBeOk()
        {
            var query = new CustomQuery <SingleKeyParentTable>(this.Fixture.Connector, this.Fixture.SelectClause);

            query.Dispose();
            query.Dispose();
        }
コード例 #2
0
        public void DisposingTwoTimesShouldBeOk()
        {
            var query = new CustomQuery <SingleKeyParentTable>(Fixture.Connector, Fixture.SelectClause);

            var result = query.Execute();

            query.Dispose();
            query.Dispose();
        }
コード例 #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>();
        }
コード例 #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();
        }