mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
Add test case for #1088
This commit is contained in:
parent
acd71883ed
commit
9b580aa073
@ -13,15 +13,19 @@
|
||||
*/
|
||||
package com.mysema.query;
|
||||
|
||||
import java.io.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static com.mysema.query.Target.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.*;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import antlr.RecognitionException;
|
||||
import antlr.TokenStreamException;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mysema.commons.lang.Pair;
|
||||
@ -42,11 +46,9 @@ import com.mysema.query.types.expr.*;
|
||||
import com.mysema.query.types.path.*;
|
||||
import com.mysema.query.types.template.NumberTemplate;
|
||||
import com.mysema.testutil.ExcludeIn;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import static com.mysema.query.Target.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import antlr.RecognitionException;
|
||||
import antlr.TokenStreamException;
|
||||
|
||||
/**
|
||||
* @author tiwe
|
||||
@ -313,6 +315,14 @@ public abstract class AbstractJPATest {
|
||||
.otherwise(4));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void Case3() {
|
||||
query().from(cat)
|
||||
.list(Expressions.cases()
|
||||
.when(cat.toes.in(2, 3)).then(cat.id.multiply(cat.toes))
|
||||
.otherwise(4));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void Cast() {
|
||||
List<Cat> cats = query().from(cat).list(cat);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user