added test for transient properties

This commit is contained in:
Timo Westkämper 2011-05-24 16:56:22 +00:00
parent a71f81b1a0
commit d3b0e141c5

View File

@ -0,0 +1,37 @@
package com.mysema.query.domain;
import static org.junit.Assert.*;
import javax.persistence.Entity;
import javax.persistence.Transient;
import org.junit.Test;
import com.mysema.query.annotations.PropertyType;
import com.mysema.query.annotations.QueryType;
public class TransientTest {
@Entity
class ExampleEntity {
@QueryType(PropertyType.SIMPLE)
@Transient
String property1;
@Transient
String property2;
@QueryType(PropertyType.SIMPLE)
transient String property3;
transient String property4;
}
@Test
public void test(){
assertNotNull(QTransientTest_ExampleEntity.exampleEntity.property1);
assertNotNull(QTransientTest_ExampleEntity.exampleEntity.property3);
}
}