Exemple #1
0
        public void Equal_IsPopulatedAsExpected()
        {
            var ce = ConditionExpression <Test> .Equal(x => x.Name, "Test");

            var result = (ConditionExpression)ce;

            Assert.Equal("ee_name", result.AttributeName);
            Assert.Equal(ConditionOperator.Equal, result.Operator);
            Assert.Equal(new[] { "Test" }, result.Values);
        }
Exemple #2
0
        public void EqualEntityReference_IsPopulatedAsExpected()
        {
            var parentId = Guid.NewGuid();
            var ce       = ConditionExpression <Test> .Equal(x => x.ParentTestRef, new EntityReference("ee_test", parentId));

            var result = (ConditionExpression)ce;

            Assert.Equal("ee_parenttestid", result.AttributeName);
            Assert.Equal(ConditionOperator.Equal, result.Operator);
            Assert.Equal(new object[] { parentId }, result.Values);
        }