Package org.jtester.hamcrest.matcher.array

Examples of org.jtester.hamcrest.matcher.array.MapMatcher


    super(map, IMapAssert.class);
    this.valueClaz = Map.class;
  }

  public IMapAssert hasKeys(Object key, Object... keys) {
    MapMatcher matcher1 = new MapMatcher(key, MapMatcherType.KEY);
    if (keys == null || keys.length == 0) {
      return assertThat(matcher1);
    }
    List<Matcher> list = new ArrayList<Matcher>();
    list.add(matcher1);
    for (Object item : keys) {
      list.add(new MapMatcher(item, MapMatcherType.KEY));
    }
    return assertThat(AllOf.allOf(list));
  }
View Full Code Here


    }
    return assertThat(AllOf.allOf(list));
  }

  public IMapAssert hasValues(Object value, Object... values) {
    MapMatcher matcher1 = new MapMatcher(value, MapMatcherType.VALUE);
    if (values == null || values.length == 0) {
      return assertThat(matcher1);
    }
    List<Matcher> list = new ArrayList<Matcher>();
    list.add(matcher1);
    for (Object item : values) {
      list.add(new MapMatcher(item, MapMatcherType.VALUE));
    }
    return assertThat(AllOf.allOf(list));
  }
View Full Code Here

TOP

Related Classes of org.jtester.hamcrest.matcher.array.MapMatcher

Copyright © 2018 www.massapicom. 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.