Examples of IsInstanceOf


Examples of org.hamcrest.core.IsInstanceOf

    public <T> Matcher<T> anything() {
        return new IsAnything<T>();
    }
   
    public Matcher<Object> a(Class<?> type) {
        return new IsInstanceOf(type);
    }
View Full Code Here

Examples of org.hamcrest.core.IsInstanceOf

    public Matcher<Object> a(Class<?> type) {
        return new IsInstanceOf(type);
    }
   
    public Matcher<Object> an(Class<?> type) {
        return new IsInstanceOf(type);
    }
View Full Code Here

Examples of org.hamcrest.core.IsInstanceOf

    Assert.assertTrue(result.containsKey("price"));
   
    Assert.assertEquals(8, result.size());
   
    final Object object = result.get("categories");
    Assert.assertThat(object, new IsInstanceOf(Set.class));
    final Set<?> categories = (Set<?>) object;
    // Must be a collection with more than 1 value
    // (there is also a describe that always returns a collection with only the first original entry).
    Assert.assertEquals(2, categories.size());
  }
View Full Code Here

Examples of org.hamcrest.core.IsInstanceOf

        is(equalTo(2)));
  }

  @Test
  public void validPropertiesObjectReturnIfBothFilesAreNull() {
    IsInstanceOf anInstanceOfPropertiesClass = new IsInstanceOf(Properties.class);
    Properties propertiesFile = null;
    Properties customProperties = null;

    Properties modifiedProperties = new PropertyFileMerger().mergePropertiesFiles(propertiesFile, customProperties);
    assertThat(modifiedProperties,
View Full Code Here

Examples of org.hamcrest.core.IsInstanceOf

     * @deprecated
     *  use {@link #aNonNull} or {@link #any} until type inference actually works in a future version of Java
     */
    @Deprecated
    public static Matcher<Object> a(Class<?> type) {
        return new IsInstanceOf(type);
    }
View Full Code Here

Examples of org.hamcrest.core.IsInstanceOf

     * @deprecated
     *  use {@link #aNonNull} or {@link #any} until type inference actually works in a future version of Java
     */
    @Deprecated
    public static Matcher<Object> an(Class<?> type) {
        return new IsInstanceOf(type);
    }
View Full Code Here

Examples of org.hamcrest.core.IsInstanceOf

    public void testDecodeStrings() throws Exception {
        Object bin = Bert.decode(new byte[]{ -125, 109, 0, 0, 0, 5, 104, 101,
                108, 108, 111});
        Assert.assertThat("recognises binary",
                bin,
                new IsInstanceOf(byte[].class));
        Assert.assertArrayEquals("decodes binary",
                new byte[]{104, 101, 108, 108, 111},
                (byte[]) bin);

        Assert.assertEquals("decodes strings",
View Full Code Here

Examples of org.hamcrest.core.IsInstanceOf

    public static <T> Matcher<T> anything() {
        return new IsAnything<T>();
    }
   
    public static Matcher<Object> a(Class<?> type) {
        return new IsInstanceOf(type);
    }
View Full Code Here

Examples of org.hamcrest.core.IsInstanceOf

    public static Matcher<Object> a(Class<?> type) {
        return new IsInstanceOf(type);
    }
   
    public static Matcher<Object> an(Class<?> type) {
        return new IsInstanceOf(type);
    }
View Full Code Here

Examples of org.jmock.core.constraint.IsInstanceOf

    protected IsSame same( Object operand ) {
        return new IsSame(operand);
    }
   
    protected IsInstanceOf instanceOf( Class type ) {
        return new IsInstanceOf(type);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.