Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #43 from rsparkyc/master

Some linq unit tests
  • Loading branch information...
commit 2bfc406ce0fd16f7000388ccdbaddcd85bd5f4bf 2 parents 98a0d47 + 69107d4
Nick Berardi nberardi authored
17 test/FluentCassandra.Tests/Linq/LinqToCqlObjectsTests.cs
View
@@ -222,5 +222,22 @@ public void ORDER_BY_DESC()
AreEqual(expected, actual);
}
+
+ [Fact]
+ public void OTHER_LINQ_SYNTAX() {
+ var expected = "SELECT * FROM Users WHERE Id = 1234";
+
+ var columnName = "Id";
+
+ IQueryable<ICqlRow> query = _family;
+
+ query = query.Where(q => q[columnName] == 1234);
+
+ var actual = query.ToString();
+
+ AreEqual(expected, actual);
+
+
+ }
}
}
13 test/FluentCassandra.Tests/Linq/LinqToCqlTests.cs
View
@@ -257,5 +257,18 @@ public void ORDER_BY_DESC()
AreEqual(expected, actual);
}
+
+ [Fact]
+ public void CHAINING_WHERE_CLAUSE()
+ {
+ var expected = "SELECT * FROM Users WHERE Id = 1234 AND Age = 10";
+
+ IQueryable<ICqlRow> query = _family;
+ query = query.Where(q => q["Id"] == 1234).Where(q => q["Age"] == 10);
+
+ var actual = query.ToString();
+ AreEqual(expected, actual);
+ }
+
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.