コード例 #1
0
        public void CorrectlyIdentifiesTable()
        {
            var factory = new SelectQueryFactory();
            var query   = factory.ParseQuery("select * from users");

            query.Table.Name.Should().Be("users");
        }
コード例 #2
0
        public void CorrectlyIdentifiesColumns()
        {
            var factory = new SelectQueryFactory();
            var query   = factory.ParseQuery("select col1, col2 from users");

            query.Columns.Count().Should().Be(2);
            query.Columns[0].Name.Should().Be("col1");
            query.Columns[1].Name.Should().Be("col2");
        }