We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbe1522 commit 1012af6Copy full SHA for 1012af6
tests/MongoFramework.Tests/Infrastructure/Querying/ExpressionTranslationTests.cs
@@ -149,5 +149,19 @@ public void TranslateConditional_Not_OrElse()
149
};
150
Assert.AreEqual(expected, result);
151
}
152
+
153
+ [TestMethod]
154
+ public void TranslateConditional_ExternalConstants()
155
+ {
156
+ var externalData = new BsonDocument { { "Data", "Hello World" } };
157
158
+ var expression = GetConditional(e => e.Id == externalData["Data"].AsString);
159
+ var result = ExpressionTranslation.TranslateConditional(expression);
160
+ var expected = new BsonDocument
161
162
+ { "Id", new BsonDocument { { "$eq", "Hello World" } } }
163
+ };
164
+ Assert.AreEqual(expected, result);
165
+ }
166
167
0 commit comments