Beispiel #1
0
        public void Columns_WhenFirstIsNull_ThrowsException()
        {
            var builder = new WhereBuilder("table", new List <WhereCondition>());

            Action action = () => builder.Columns(null, null);

            action.Should()
            .Throw <ArgumentNullException>()
            .Which.ParamName.Should()
            .Be("first");
        }
Beispiel #2
0
        public void Columns_WithFirstAndSecond_AddsConditionToList()
        {
            var whereConditions = new List <WhereCondition>();
            var builder         = new WhereBuilder("table", whereConditions);

            builder.Columns("id", "name");

            whereConditions.Should()
            .ContainSingle()
            .Which.Should()
            .BeEquivalentTo(new CompareColumnsCondition("table", "id", "=", "table", "name"));
        }