本文整理了Java中org.ldp4j.commons.testing.Utils.defaultToString()
方法的一些代码示例,展示了Utils.defaultToString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.defaultToString()
方法的具体详情如下:
包路径:org.ldp4j.commons.testing.Utils
类名称:Utils
方法名:defaultToString
[英]Returns the default string representation of an object as implemented in the Object class.
[中]返回对象类中实现的对象的默认字符串表示形式。
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testDefaultToString$regularImplementation() {
Object obj=new Object();
assertThat(Utils.defaultToString(obj),equalTo(obj.toString()));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testDefaultToString$customObjectOverridingHashButNotEquals() {
Object obj=new CustomHashObject(1234);
assertThat(Utils.defaultToString(obj),equalTo(obj.toString()));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testToString() throws Exception {
assertThat(
this.sut.toString(),
not(equalTo(Utils.defaultToString(sut))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testDefaultToString$customObjectNotOverridingHashNorEquals() {
Object obj=new CustomObject();
assertThat(Utils.defaultToString(obj),equalTo(obj.toString()));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testToString() throws Exception {
assertThat(
this.sut.toString(),
not(equalTo(Utils.defaultToString(sut))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testToString$nonEmpty() throws Exception {
assertThat(this.sut.toString(),not(equalTo(Utils.defaultToString(this.sut))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void hasCustomToString() throws Exception {
assertThat(sut.toString(),not(equalTo(Utils.defaultToString(sut))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testHasCustomStringRepresentation() {
ImmutableElementParameter sut = createParameter("header", "value");
assertThat(sut.toString(),not(equalTo(Utils.defaultToString(sut))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testHasCustomStringRepresentation() {
ImmutableElement sut = createElement("header");
assertThat(sut.toString(),not(equalTo(Utils.defaultToString(sut))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testHasCustomStringRepresentation() {
ImmutableHeader sut = createHeader("header", "value");
assertThat(sut.toString(),not(equalTo(Utils.defaultToString(sut))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testToString() throws Exception {
ApplicationContext sut = createContext();
assertThat(
sut.toString(),
not(equalTo(Utils.defaultToString(sut))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testToString$empty() throws Exception {
final ImmutableNamespaces ns = new ImmutableNamespaces();
assertThat(ns.toString(),not(equalTo(Utils.defaultToString(ns))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testHasCustomStringRepresentation() {
assertThat(singleValuedParameter().toString(),not(equalTo(Utils.defaultToString(singleValuedParameter()))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void hasCustomStringRepresentation() {
final Weighted<String> original=Weighted.newInstance().withWeight(0.123D).withEntity("text/turtle");
assertThat(original.toString(),not(equalTo(Utils.defaultToString(original))));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testHasCustomStringRepresentation() {
assertThat(queryWithParameters().toString(),not(equalTo(Utils.defaultToString(queryWithParameters()))));
}
内容来源于网络,如有侵权,请联系作者删除!