public void Should_Throw_Exception_When_NonExisting_Expression_Passed() { var builder = GetTreeBuilderFacade(true); var expressionId = new Guid("ff177a45-709a-48e6-96f9-6cc243d7bc3d"); var transaction = default(TransactionCategoryRow); var evaluator = new CachedEvaluator(builder, Expressions); Assert.Throws <KeyNotFoundException>(() => evaluator.Evaluate(expressionId, transaction)); }
public void Should_Evaluate_True() { var builder = GetTreeBuilderFacade(true); var expressionId = new Guid("183f9ace-428e-4f6e-8f11-03bc660064ed"); var transaction = new TransactionCategoryRow(null, new List <Service.Transactions.Category>()); var evaluator = new CachedEvaluator(builder, Expressions); Assert.True(evaluator.Evaluate(expressionId, transaction)); }