/** * Returns a the set of values that can be used to replace the values * returned from {@link #getSampleValues()}. This method must return an * array with the same length as {@link #getSampleValues()}. The values * returned from this method should not be the same as those returned from * {@link #getSampleValues()}. The default implementation constructs a * set of String values and includes a single null value if * {@link #isAllowNullValue()} returns {@code true}, and includes two values * that are the same if {@link #isAllowDuplicateValues()} returns * {@code true}. */ public Object[] getNewSampleValues() { Object[] result = new Object[] { (isAllowNullValue() && !JDK12 && isAllowDuplicateValues()) ? null : "newnonnullvalue", "newvalue", (isAllowDuplicateValues()) ? "newvalue" : "newvalue2", "newblahv", "newfoov", "newbarv", "newbazv", "newtmpv", "newgoshv", "newgollyv", "newgeev", "newhellov", "newgoodbyev", "newwe'llv", "newseev", "newyouv", "newallv", "newagainv", }; return result; }
/** * Returns the set of values in the mappings used to test the map. This * method must return an array with the same length as * {@link #getSampleKeys()}. The default implementation constructs a set of * String values and includes a single null value if * {@link #isAllowNullValue()} returns {@code true}, and includes * two values that are the same if {@link #isAllowDuplicateValues()} returns * {@code true}. */ public Object[] getSampleValues() { Object[] result = new Object[] { "blahv", "foov", "barv", "bazv", "tmpv", "goshv", "gollyv", "geev", "hellov", "goodbyev", "we'llv", "seev", "youv", "allv", "againv", (isAllowNullValue() && !JDK12) ? null : "nonnullvalue", "value", (isAllowDuplicateValues()) ? "value" : "value2", }; return result; }
if (!isAllowDuplicateValues()) { assertTrue("Map should not contain old value after put when changed", !map.containsValue(values[i])); if (!isAllowDuplicateValues()) { assertTrue("Map should not contain old value after put when changed", !map.containsValue(values[i]));
/** * Returns a the set of values that can be used to replace the values * returned from {@link #getSampleValues()}. This method must return an * array with the same length as {@link #getSampleValues()}. The values * returned from this method should not be the same as those returned from * {@link #getSampleValues()}. The default implementation constructs a * set of String values and includes a single null value if * {@link #isAllowNullValue()} returns {@code true}, and includes two values * that are the same if {@link #isAllowDuplicateValues()} returns * {@code true}. */ public Object[] getNewSampleValues() { Object[] result = new Object[] { (isAllowNullValue() && !JDK12 && isAllowDuplicateValues()) ? null : "newnonnullvalue", "newvalue", (isAllowDuplicateValues()) ? "newvalue" : "newvalue2", "newblahv", "newfoov", "newbarv", "newbazv", "newtmpv", "newgoshv", "newgollyv", "newgeev", "newhellov", "newgoodbyev", "newwe'llv", "newseev", "newyouv", "newallv", "newagainv", }; return result; }
/** * Returns the set of values in the mappings used to test the map. This * method must return an array with the same length as * {@link #getSampleKeys()}. The default implementation constructs a set of * String values and includes a single null value if * {@link #isAllowNullValue()} returns {@code true}, and includes * two values that are the same if {@link #isAllowDuplicateValues()} returns * {@code true}. */ public Object[] getSampleValues() { Object[] result = new Object[] { "blahv", "foov", "barv", "bazv", "tmpv", "goshv", "gollyv", "geev", "hellov", "goodbyev", "we'llv", "seev", "youv", "allv", "againv", (isAllowNullValue() && !JDK12) ? null : "nonnullvalue", "value", (isAllowDuplicateValues()) ? "value" : "value2", }; return result; }
if (!isAllowDuplicateValues()) { assertTrue("Map should not contain old value after put when changed", !map.containsValue(values[i])); if (!isAllowDuplicateValues()) { assertTrue("Map should not contain old value after put when changed", !map.containsValue(values[i]));