📄 fieldmapping.java
字号:
package net.chrisrichardson.ormunit.hibernate;
import junit.framework.Assert;
import org.hibernate.engine.CascadeStyle;
import org.hibernate.mapping.Property;
import org.hibernate.util.ArrayHelper;
public class FieldMapping {
protected Property property;
public FieldMapping(Property property) {
this.property = property;
}
public void assertCascade(CascadeStyle cascade) {
CascadeStyle actualCascade = this.property.getCascadeStyle();
if (actualCascade instanceof CascadeStyle.MultipleCascadeStyle)
Assert.assertEquals(ArrayHelper.toString(new Object[] { cascade }),
actualCascade.toString());
else
Assert.assertEquals(cascade.toString(), actualCascade.toString());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -