コード例 #1
0
        public void AndAlsoTest()
        {
            LinqToSparqlExpTranslator<Track> target = new LinqToSparqlExpTranslator<Track>();
            target.TypeTranslator = new XsdtTypeConverter();

            Expression e = Expression.AndAlso(
                EH.Member(GetType().GetProperty("BooleanTestProperty")),
                Expression.Constant(true));
            StringBuilder sb = new StringBuilder();
            target.StringBuilder = sb;
            target.AndAlso(e);
            string actualResult = sb.ToString();
            string expectedResult = "(?BooleanTestProperty)&&(True^^xsdt:boolean)";
            Assert.AreEqual(expectedResult, actualResult);
        }