Skip to content

Commit

Permalink
Added external constants test
Browse files Browse the repository at this point in the history
  • Loading branch information
Turnerj committed Nov 16, 2019
1 parent bbe1522 commit 1012af6
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,19 @@ public void TranslateConditional_Not_OrElse()
};
Assert.AreEqual(expected, result);
}

[TestMethod]
public void TranslateConditional_ExternalConstants()
{
var externalData = new BsonDocument { { "Data", "Hello World" } };

var expression = GetConditional(e => e.Id == externalData["Data"].AsString);
var result = ExpressionTranslation.TranslateConditional(expression);
var expected = new BsonDocument
{
{ "Id", new BsonDocument { { "$eq", "Hello World" } } }
};
Assert.AreEqual(expected, result);
}
}
}

0 comments on commit 1012af6

Please sign in to comment.