use of org.apache.hc.core5.http.copied.NameValuePair in project httpcomponents-core by apache.
the class TestNameValuePair method testNullValue2NotEqual.
@Test
public void testNullValue2NotEqual() throws Exception {
final NameValuePair NameValuePair = new BasicNameValuePair("name", "value");
final NameValuePair NameValuePair2 = new BasicNameValuePair("name", null);
Assertions.assertNotEquals(NameValuePair, NameValuePair2);
}
use of org.apache.hc.core5.http.copied.NameValuePair in project httpcomponents-core by apache.
the class TestNameValuePair method testObjectNotEqual.
@Test
public void testObjectNotEqual() throws Exception {
final NameValuePair NameValuePair = new BasicNameValuePair("name", "value");
Assertions.assertNotEquals(NameValuePair, new Object());
}
use of org.apache.hc.core5.http.copied.NameValuePair in project httpcomponents-core by apache.
the class TestNameValuePair method testHashCode.
@Test
public void testHashCode() throws Exception {
final NameValuePair NameValuePair = new BasicNameValuePair("name", null);
final NameValuePair NameValuePair2 = new BasicNameValuePair("name2", null);
Assertions.assertNotEquals(NameValuePair.hashCode(), NameValuePair2.hashCode());
final NameValuePair NameValuePair3 = new BasicNameValuePair("name", "value");
final NameValuePair NameValuePair4 = new BasicNameValuePair("name", "value2");
Assertions.assertNotEquals(NameValuePair3.hashCode(), NameValuePair4.hashCode());
final NameValuePair NameValuePair5 = new BasicNameValuePair("name", "value");
final NameValuePair NameValuePair6 = new BasicNameValuePair("name", null);
Assertions.assertNotEquals(NameValuePair5.hashCode(), NameValuePair6.hashCode());
}
use of org.apache.hc.core5.http.copied.NameValuePair in project httpcomponents-core by apache.
the class TestNameValuePair method testValueEquals.
@Test
public void testValueEquals() throws Exception {
final NameValuePair NameValuePair = new BasicNameValuePair("name", "value");
final NameValuePair NameValuePair2 = new BasicNameValuePair("name", "value");
Assertions.assertEquals(NameValuePair, NameValuePair2);
Assertions.assertEquals(NameValuePair.hashCode(), NameValuePair2.hashCode());
}
use of org.apache.hc.core5.http.copied.NameValuePair in project httpcomponents-core by apache.
the class TestNameValuePair method testEquals.
@Test
public void testEquals() throws Exception {
final NameValuePair NameValuePair = new BasicNameValuePair("name", "value");
final NameValuePair NameValuePair2 = new BasicNameValuePair("name", "value");
Assertions.assertEquals(NameValuePair, NameValuePair);
Assertions.assertEquals(NameValuePair.hashCode(), NameValuePair.hashCode());
Assertions.assertEquals(NameValuePair2, NameValuePair2);
Assertions.assertEquals(NameValuePair2.hashCode(), NameValuePair2.hashCode());
Assertions.assertEquals(NameValuePair, NameValuePair2);
Assertions.assertEquals(NameValuePair.hashCode(), NameValuePair2.hashCode());
}
Aggregations