target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void hashing() { assertEquals(serializable.hashCode(), type.hashCode(serializable)); } | public final int hashCode(Object value) throws HibernateException { return value.hashCode(); } | AbstractType { public final int hashCode(Object value) throws HibernateException { return value.hashCode(); } } | AbstractType { public final int hashCode(Object value) throws HibernateException { return value.hashCode(); } } | AbstractType { public final int hashCode(Object value) throws HibernateException { return value.hashCode(); } final boolean equals(Object x, Object y); final int hashCode(Object value); } | AbstractType { public final int hashCode(Object value) throws HibernateException { return value.hashCode(); } final boolean equals(Object x, Object y); final int hashCode(Object value); } |
@Test public void getButWasNull() throws Exception { final ResultSet rs = mockery.mock(ResultSet.class); final Sequence execution = mockery.sequence("execution"); mockery.checking(new Expectations() {{ one(rs).getString(with(equal("name0here"))); inSequence(execution); will(returnValue("78")); one(rs).wasNull(); inSequ... | public final T nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String representation = rs.getString(names[0]); if (rs.wasNull() || representation == null) { return null; } else { return converter().fromString(representation); } } | AbstractStringImmutableType extends AbstractImmutableType implements UserType { public final T nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String representation = rs.getString(names[0]); if (rs.wasNull() || representation == null) { return null; } else { return conv... | AbstractStringImmutableType extends AbstractImmutableType implements UserType { public final T nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String representation = rs.getString(names[0]); if (rs.wasNull() || representation == null) { return null; } else { return conv... | AbstractStringImmutableType extends AbstractImmutableType implements UserType { public final T nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String representation = rs.getString(names[0]); if (rs.wasNull() || representation == null) { return null; } else { return conv... | AbstractStringImmutableType extends AbstractImmutableType implements UserType { public final T nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String representation = rs.getString(names[0]); if (rs.wasNull() || representation == null) { return null; } else { return conv... |
@Test public void getHadData() throws Exception { final ResultSet rs = mockery.mock(ResultSet.class); final Sequence execution = mockery.sequence("execution"); mockery.checking(new Expectations() {{ one(rs).getString(with(equal("name0here"))); inSequence(execution); will(returnValue("98")); one(rs).wasNull(); inSequenc... | public final T nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String representation = rs.getString(names[0]); if (rs.wasNull() || representation == null) { return null; } else { return converter().fromString(representation); } } | AbstractStringImmutableType extends AbstractImmutableType implements UserType { public final T nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String representation = rs.getString(names[0]); if (rs.wasNull() || representation == null) { return null; } else { return conv... | AbstractStringImmutableType extends AbstractImmutableType implements UserType { public final T nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String representation = rs.getString(names[0]); if (rs.wasNull() || representation == null) { return null; } else { return conv... | AbstractStringImmutableType extends AbstractImmutableType implements UserType { public final T nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String representation = rs.getString(names[0]); if (rs.wasNull() || representation == null) { return null; } else { return conv... | AbstractStringImmutableType extends AbstractImmutableType implements UserType { public final T nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String representation = rs.getString(names[0]); if (rs.wasNull() || representation == null) { return null; } else { return conv... |
@Test public void get1() throws Exception { TypeLiteral<?> expected = new TypeLiteral<List<Foo>>() {}; TypeLiteral<?> actual = TypeLiterals.get(List.class, Foo.class); assertEquals(expected, actual); } | @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... |
@Test public void get2() throws Exception { TypeLiteral<?> expected = new TypeLiteral<Pair<Integer, Double>>() {}; TypeLiteral<?> actual = TypeLiterals.get( Pair.class, Integer.class, Double.class); assertEquals(expected, actual); } | @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... |
@Test public void get3() throws Exception { TypeLiteral<?> expected = new TypeLiteral<List<List<Foo>>>() {}; TypeLiteral<?> inner = new TypeLiteral<List<Foo>>() {}; TypeLiteral<?> actual = TypeLiterals.get(List.class, inner); assertEquals(expected, actual); } | @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... |
@Test public void get4() throws Exception { TypeLiteral<?> a = TypeLiterals.get(List.class, Integer.class); TypeLiteral<?> b = TypeLiterals.get(List.class, Double.class); assertNotEquals(a, b); } | @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... |
@Test public void get5() throws Exception { TypeLiteral<?> a = TypeLiterals.get(List.class, new TypeLiteral<Double>() {}); TypeLiteral<?> b = TypeLiterals.get(List.class, Double.class); assertEquals(a, b); } | @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... |
@Test public void constructMe4() { ConstructMe4Optionality instance = Instantiators .createInstantiator(ConstructMe4Optionality.class) .newInstance((String) null); assertNotNull(instance); assertNull(instance.name); } | public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } } | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... |
@Test public void toString1() throws Exception { assertEquals("java.util.List<java.lang.Double>", TypeLiterals.get(List.class, Double.class).toString()); } | @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... |
@Test public void toString2() throws Exception { assertEquals("java.util.Map<java.lang.Integer, java.lang.Double>", TypeLiterals.get(Map.class, Integer.class, Double.class).toString()); } | @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... |
@Test public void toString3() throws Exception { assertEquals("java.util.List<java.lang.Double>", TypeLiterals.get(List.class, new TypeLiteral<Double>() {}).toString()); } | @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); } | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... | TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... paramet... |
@Test public void constructMe5() { ConstructMe5OptionalityWithDefaultValue instance = Instantiators .createInstantiator(ConstructMe5OptionalityWithDefaultValue.class) .newInstance((String) null); assertNotNull(instance); assertEquals((Integer) 90, instance.number); } | public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } } | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... |
@Test public void constructMe6() { Instantiator<ConstructMe6OptionalType> instantiator = Instantiators .createInstantiator(ConstructMe6OptionalType.class); ConstructMe6OptionalType instance = instantiator .newInstance((String) null, (String) null); assertNotNull(instance); assertTrue(instance.hero.isEmpty()); assertTru... | public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } } | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... |
@Test public void constructMe6WithValue() { Instantiator<ConstructMe6OptionalType> instantiator = Instantiators .createInstantiator(ConstructMe6OptionalType.class); ConstructMe6OptionalType instance = instantiator .newInstance("Jack Bauer", "Chloe O'Brian"); assertNotNull(instance); assertEquals("Jack Bauer", instance.... | public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } } | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... |
@Test public void argumentAreNotSavedToFields() { Instantiator<ArgumentAreNotSavedToFields> instantiator = Instantiators .createInstantiator(ArgumentAreNotSavedToFields.class); ArgumentAreNotSavedToFields instance = instantiator .newInstance("1", "2", "3"); assertNotNull(instance); assertEquals(1, instance.is); assertE... | public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } } | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... | Instantiators { public static <T> Instantiator<T> createInstantiator( Class<T> klass, InstantiatorModule... modules) { Errors errors = new Errors(); for (Instantiator<T> instantiator : createInstantiator(errors, klass, modules)) { return instantiator; } errors.throwIfHasErrors(); throw new IllegalStateException(); } pr... |
@Test public void test() throws Exception { assertThat(results(DateTime.parse("20180101"), 10), AllOf.<Matcher<RecurrenceRule>>allOf( matches(new RecurrenceRule("FREQ=DAILY;COUNT=10")), mismatches(new RecurrenceRule("FREQ=DAILY;COUNT=9"), "number of instances was <9>"), mismatches(new RecurrenceRule("FREQ=DAILY;COUNT=1... | public static Matcher<RecurrenceRule> results(DateTime start, Matcher<Integer> count) { return new ResultsMatcher(start, is(count)); } | ResultsMatcher extends TypeSafeDiagnosingMatcher<RecurrenceRule> { public static Matcher<RecurrenceRule> results(DateTime start, Matcher<Integer> count) { return new ResultsMatcher(start, is(count)); } } | ResultsMatcher extends TypeSafeDiagnosingMatcher<RecurrenceRule> { public static Matcher<RecurrenceRule> results(DateTime start, Matcher<Integer> count) { return new ResultsMatcher(start, is(count)); } ResultsMatcher(DateTime start, Matcher<Integer> countMatcher); } | ResultsMatcher extends TypeSafeDiagnosingMatcher<RecurrenceRule> { public static Matcher<RecurrenceRule> results(DateTime start, Matcher<Integer> count) { return new ResultsMatcher(start, is(count)); } ResultsMatcher(DateTime start, Matcher<Integer> countMatcher); static Matcher<RecurrenceRule> results(DateTime start, ... | ResultsMatcher extends TypeSafeDiagnosingMatcher<RecurrenceRule> { public static Matcher<RecurrenceRule> results(DateTime start, Matcher<Integer> count) { return new ResultsMatcher(start, is(count)); } ResultsMatcher(DateTime start, Matcher<Integer> countMatcher); static Matcher<RecurrenceRule> results(DateTime start, ... |
@Test public void test() throws Exception { assertThat(inWeekOfYear(16), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20180418T010001Z")), mismatches(DateTime.parse("20180415T005959Z"), "week of year was <15>"), mismatches(DateTime.parse("20180423T010000Z"), "week of year was <17>"), describesAs("week of yea... | public static Matcher<DateTime> inWeekOfYear(Matcher<Integer> weekOfYearMatcher) { return new WeekOfYearMatcher(weekOfYearMatcher); } | WeekOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inWeekOfYear(Matcher<Integer> weekOfYearMatcher) { return new WeekOfYearMatcher(weekOfYearMatcher); } } | WeekOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inWeekOfYear(Matcher<Integer> weekOfYearMatcher) { return new WeekOfYearMatcher(weekOfYearMatcher); } WeekOfYearMatcher(Matcher<Integer> subMatcher); } | WeekOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inWeekOfYear(Matcher<Integer> weekOfYearMatcher) { return new WeekOfYearMatcher(weekOfYearMatcher); } WeekOfYearMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> inWeekOfYear(Matcher<Integer> weekOfYearMatcher); s... | WeekOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inWeekOfYear(Matcher<Integer> weekOfYearMatcher) { return new WeekOfYearMatcher(weekOfYearMatcher); } WeekOfYearMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> inWeekOfYear(Matcher<Integer> weekOfYearMatcher); s... |
@Test public void test() throws Exception { assertThat(onDayOfMonth(10), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20180710T010001Z")), mismatches(DateTime.parse("20181001T005959Z"), "day of month was <1>"), mismatches(DateTime.parse("20181011T010000Z"), "day of month was <11>"), describesAs("day of month... | public static Matcher<DateTime> onDayOfMonth(Matcher<Integer> dayMatcher) { return new DayOfMonthMatcher(dayMatcher); } | DayOfMonthMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfMonth(Matcher<Integer> dayMatcher) { return new DayOfMonthMatcher(dayMatcher); } } | DayOfMonthMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfMonth(Matcher<Integer> dayMatcher) { return new DayOfMonthMatcher(dayMatcher); } DayOfMonthMatcher(Matcher<Integer> subMatcher); } | DayOfMonthMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfMonth(Matcher<Integer> dayMatcher) { return new DayOfMonthMatcher(dayMatcher); } DayOfMonthMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> onDayOfMonth(Matcher<Integer> dayMatcher); static Matcher<DateTim... | DayOfMonthMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfMonth(Matcher<Integer> dayMatcher) { return new DayOfMonthMatcher(dayMatcher); } DayOfMonthMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> onDayOfMonth(Matcher<Integer> dayMatcher); static Matcher<DateTim... |
@Test public void test() throws Exception { assertThat(inMonth(10), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20181001T010001Z")), mismatches(DateTime.parse("20180901T005959Z"), "month was <9>"), mismatches(DateTime.parse("20181101T010000Z"), "month was <11>"), describesAs("month (<10>)") )); assertThat(i... | public static Matcher<DateTime> inMonth(Matcher<Integer> monthMatcher) { return new MonthMatcher(monthMatcher); } | MonthMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inMonth(Matcher<Integer> monthMatcher) { return new MonthMatcher(monthMatcher); } } | MonthMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inMonth(Matcher<Integer> monthMatcher) { return new MonthMatcher(monthMatcher); } MonthMatcher(Matcher<Integer> subMatcher); } | MonthMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inMonth(Matcher<Integer> monthMatcher) { return new MonthMatcher(monthMatcher); } MonthMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> inMonth(Matcher<Integer> monthMatcher); static Matcher<DateTime> inMonth(Integer.... | MonthMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inMonth(Matcher<Integer> monthMatcher) { return new MonthMatcher(monthMatcher); } MonthMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> inMonth(Matcher<Integer> monthMatcher); static Matcher<DateTime> inMonth(Integer.... |
@Test public void test() throws Exception { assertThat(after(DateTime.parse("20180101T010000Z")), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20180101T010001Z")), mismatches(DateTime.parse("20180101T005959Z"), "not after 20180101T010000Z"), mismatches(DateTime.parse("20180101T010000Z"), "not after 20180101T... | public static Matcher<DateTime> after(String dateTime) { return after(DateTime.parse(dateTime)); } | AfterMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> after(String dateTime) { return after(DateTime.parse(dateTime)); } } | AfterMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> after(String dateTime) { return after(DateTime.parse(dateTime)); } AfterMatcher(DateTime referenceDate); } | AfterMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> after(String dateTime) { return after(DateTime.parse(dateTime)); } AfterMatcher(DateTime referenceDate); static Matcher<DateTime> after(String dateTime); static Matcher<DateTime> after(DateTime dateTime); @Override void describeT... | AfterMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> after(String dateTime) { return after(DateTime.parse(dateTime)); } AfterMatcher(DateTime referenceDate); static Matcher<DateTime> after(String dateTime); static Matcher<DateTime> after(DateTime dateTime); @Override void describeT... |
@Test public void test() throws Exception { assertThat(onWeekDay(Weekday.WE), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20180808T010001Z")), mismatches(DateTime.parse("20180809T005959Z"), "weekday was <TH>"), mismatches(DateTime.parse("20180807T010000Z"), "weekday was <TU>"), describesAs("weekday (<WE>)")... | public static Matcher<DateTime> onWeekDay(Matcher<Weekday> weekdayMatcher) { return new WeekDayMatcher(weekdayMatcher); } | WeekDayMatcher extends FeatureMatcher<DateTime, Weekday> { public static Matcher<DateTime> onWeekDay(Matcher<Weekday> weekdayMatcher) { return new WeekDayMatcher(weekdayMatcher); } } | WeekDayMatcher extends FeatureMatcher<DateTime, Weekday> { public static Matcher<DateTime> onWeekDay(Matcher<Weekday> weekdayMatcher) { return new WeekDayMatcher(weekdayMatcher); } WeekDayMatcher(Matcher<Weekday> subMatcher); } | WeekDayMatcher extends FeatureMatcher<DateTime, Weekday> { public static Matcher<DateTime> onWeekDay(Matcher<Weekday> weekdayMatcher) { return new WeekDayMatcher(weekdayMatcher); } WeekDayMatcher(Matcher<Weekday> subMatcher); static Matcher<DateTime> onWeekDay(Matcher<Weekday> weekdayMatcher); static Matcher<DateTime> ... | WeekDayMatcher extends FeatureMatcher<DateTime, Weekday> { public static Matcher<DateTime> onWeekDay(Matcher<Weekday> weekdayMatcher) { return new WeekDayMatcher(weekdayMatcher); } WeekDayMatcher(Matcher<Weekday> subMatcher); static Matcher<DateTime> onWeekDay(Matcher<Weekday> weekdayMatcher); static Matcher<DateTime> ... |
@Test public void test() throws Exception { assertThat(before(DateTime.parse("20180101T010000Z")), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20180101T000059Z")), mismatches(DateTime.parse("20180101T010001Z"), "not before 20180101T010000Z"), mismatches(DateTime.parse("20180101T010000Z"), "not before 201801... | public static Matcher<DateTime> before(String dateTime) { return before(DateTime.parse(dateTime)); } | BeforeMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> before(String dateTime) { return before(DateTime.parse(dateTime)); } } | BeforeMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> before(String dateTime) { return before(DateTime.parse(dateTime)); } BeforeMatcher(DateTime referenceDate); } | BeforeMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> before(String dateTime) { return before(DateTime.parse(dateTime)); } BeforeMatcher(DateTime referenceDate); static Matcher<DateTime> before(String dateTime); static Matcher<DateTime> before(DateTime dateTime); @Override void des... | BeforeMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> before(String dateTime) { return before(DateTime.parse(dateTime)); } BeforeMatcher(DateTime referenceDate); static Matcher<DateTime> before(String dateTime); static Matcher<DateTime> before(DateTime dateTime); @Override void des... |
@Test public void test() throws Exception { assertThat(onDayOfYear(10), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20180110T010001Z")), mismatches(DateTime.parse("20180111T005959Z"), "day of year was <11>"), mismatches(DateTime.parse("20180109T010000Z"), "day of year was <9>"), describesAs("day of year (<1... | public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher) { return new DayOfYearMatcher(dayMatcher); } | DayOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher) { return new DayOfYearMatcher(dayMatcher); } } | DayOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher) { return new DayOfYearMatcher(dayMatcher); } DayOfYearMatcher(Matcher<Integer> subMatcher); } | DayOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher) { return new DayOfYearMatcher(dayMatcher); } DayOfYearMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher); static Matcher<DateTime> on... | DayOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher) { return new DayOfYearMatcher(dayMatcher); } DayOfYearMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher); static Matcher<DateTime> on... |
@Test public void test() throws Exception { assertThat(inYear(2018), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20181001T010001Z")), mismatches(DateTime.parse("20210901T005959Z"), "year was <2021>"), mismatches(DateTime.parse("20171101T010000Z"), "year was <2017>"), describesAs("year (<2018>)") )); assertT... | public static Matcher<DateTime> inYear(Matcher<Integer> yearMatcher) { return new YearMatcher(yearMatcher); } | YearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inYear(Matcher<Integer> yearMatcher) { return new YearMatcher(yearMatcher); } } | YearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inYear(Matcher<Integer> yearMatcher) { return new YearMatcher(yearMatcher); } YearMatcher(Matcher<Integer> subMatcher); } | YearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inYear(Matcher<Integer> yearMatcher) { return new YearMatcher(yearMatcher); } YearMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> inYear(Matcher<Integer> yearMatcher); static Matcher<DateTime> inYear(Integer... years)... | YearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> inYear(Matcher<Integer> yearMatcher) { return new YearMatcher(yearMatcher); } YearMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> inYear(Matcher<Integer> yearMatcher); static Matcher<DateTime> inYear(Integer... years)... |
@Test public void testEntrySetToArray() throws IOException { SharedHashMap map = map5(); Set s = map.entrySet(); Object[] ar = s.toArray(); assertEquals(5, ar.length); for (int i = 0; i < 5; ++i) { assertTrue(map.containsKey(((Map.Entry) (ar[i])).getKey())); assertTrue(map.containsValue(((Map.Entry) (ar[i])).getValue()... | @NotNull @Override public Set<Entry<K, V>> entrySet() { return new EntrySet(); } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @NotNull @Override public Set<Entry<K, V>> entrySet() { return new EntrySet(); } } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @NotNull @Override public Set<Entry<K, V>> entrySet() { return new EntrySet(); } VanillaSharedReplicatedHashMap(@NotNull SharedHashMapBuilder bu... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @NotNull @Override public Set<Entry<K, V>> entrySet() { return new EntrySet(); } VanillaSharedReplicatedHashMap(@NotNull SharedHashMapBuilder bu... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @NotNull @Override public Set<Entry<K, V>> entrySet() { return new EntrySet(); } VanillaSharedReplicatedHashMap(@NotNull SharedHashMapBuilder bu... |
@Test @Ignore public void testPut() throws ExecutionException, InterruptedException { int count = 1000000; HugeConfig config = HugeConfig.DEFAULT.clone() .setSegments(256) .setSmallEntrySize(72) .setCapacity(count); final HugeHashMap<CharSequence, SampleValues> map = new HugeHashMap<CharSequence, SampleValues>( config,... | @Override public V put(K key, V value) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].put(segmentHash, key, value, true, true); return null; } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V put(K key, V value) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].put(segmentHash, key, value, true, true); return null; } } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V put(K key, V value) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].put(segmentHash, key, value, true, true); return null; } HugeHashMap(); HugeHashMa... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V put(K key, V value) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].put(segmentHash, key, value, true, true); return null; } HugeHashMap(); HugeHashMa... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V put(K key, V value) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].put(segmentHash, key, value, true, true); return null; } HugeHashMap(); HugeHashMa... |
@Test public void entrySetRemoveAllReflectedInMapAndOtherViews() { HugeHashMap<Integer, String> map = getViewTestMap(3); Set<Map.Entry<Integer, String>> entrySet = map.entrySet(); Set<Integer> keySet = map.keySet(); Collection<String> values = map.values(); entrySet.removeAll( Arrays.asList( new AbstractMap.SimpleEntry... | @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... |
@Test public void keySetRemoveAllReflectedInMapAndOtherViews() { HugeHashMap<Integer, String> map = getViewTestMap(3); Set<Map.Entry<Integer, String>> entrySet = map.entrySet(); Set<Integer> keySet = map.keySet(); Collection<String> values = map.values(); keySet.removeAll(Arrays.asList(1, 2)); assertMap(map, new int[]{... | @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... |
@Test public void valuesRemoveAllReflectedInMapAndOtherViews() { HugeHashMap<Integer, String> map = getViewTestMap(3); Set<Map.Entry<Integer, String>> entrySet = map.entrySet(); Set<Integer> keySet = map.keySet(); Collection<String> values = map.values(); values.removeAll(Arrays.asList("1", "2")); assertMap(map, new in... | @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... |
@Test public void entrySetRetainAllReflectedInMapAndOtherViews() { HugeHashMap<Integer, String> map = getViewTestMap(3); Set<Map.Entry<Integer, String>> entrySet = map.entrySet(); Set<Integer> keySet = map.keySet(); Collection<String> values = map.values(); entrySet.retainAll( Arrays.asList( new AbstractMap.SimpleEntry... | @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... |
@Test public void keySetRetainAllReflectedInMapAndOtherViews() { HugeHashMap<Integer, String> map = getViewTestMap(3); Set<Map.Entry<Integer, String>> entrySet = map.entrySet(); Set<Integer> keySet = map.keySet(); Collection<String> values = map.values(); keySet.retainAll(Arrays.asList(1, 2)); assertMap(map, new int[]{... | @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... |
@Test public void valuesRetainAllReflectedInMapAndOtherViews() { HugeHashMap<Integer, String> map = getViewTestMap(3); Set<Map.Entry<Integer, String>> entrySet = map.entrySet(); Set<Integer> keySet = map.keySet(); Collection<String> values = map.values(); values.retainAll(Arrays.asList("1", "2")); assertMap(map, new in... | @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap(); HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V ge... |
@Test public void clearMapViaKeyIteratorRemoves() { int noOfElements = 16 * 1024; HugeHashMap<Integer, String> map = getViewTestMap(noOfElements); int sum = 0; for (Iterator it = map.keySet().iterator(); it.hasNext(); ) { it.next(); it.remove(); ++sum; } assertEquals(noOfElements, sum); } | @Override public V remove(Object key) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].remove(segmentHash, (K) key); return null; } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V remove(Object key) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].remove(segmentHash, (K) key); return null; } } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V remove(Object key) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].remove(segmentHash, (K) key); return null; } HugeHashMap(); HugeHashMap(HugeConfig ... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V remove(Object key) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].remove(segmentHash, (K) key); return null; } HugeHashMap(); HugeHashMap(HugeConfig ... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V remove(Object key) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].remove(segmentHash, (K) key); return null; } HugeHashMap(); HugeHashMap(HugeConfig ... |
@Test public void clearMapViaValueIteratorRemoves() { int noOfElements = 16 * 1024; HugeHashMap<Integer, String> map = getViewTestMap(noOfElements); int sum = 0; for (Iterator it = map.values().iterator(); it.hasNext(); ) { it.next(); it.remove(); ++sum; } assertEquals(noOfElements, sum); } | @Override public V remove(Object key) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].remove(segmentHash, (K) key); return null; } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V remove(Object key) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].remove(segmentHash, (K) key); return null; } } | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V remove(Object key) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].remove(segmentHash, (K) key); return null; } HugeHashMap(); HugeHashMap(HugeConfig ... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V remove(Object key) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].remove(segmentHash, (K) key); return null; } HugeHashMap(); HugeHashMap(HugeConfig ... | HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @Override public V remove(Object key) { long hash = hasher.hash(key); int segment = hasher.getSegment(hash); int segmentHash = hasher.segmentHash(hash); segments[segment].remove(segmentHash, (K) key); return null; } HugeHashMap(); HugeHashMap(HugeConfig ... |
@Test public void testEntrySet() throws IOException { SharedHashMap map = map5(); Set s = map.entrySet(); assertEquals(5, s.size()); Iterator it = s.iterator(); while (it.hasNext()) { Map.Entry e = (Map.Entry) it.next(); assertTrue( (e.getKey().equals(JSR166TestCase.one) && e.getValue().equals("A")) || (e.getKey().equa... | @NotNull @Override public Set<Entry<K, V>> entrySet() { return new EntrySet(); } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @NotNull @Override public Set<Entry<K, V>> entrySet() { return new EntrySet(); } } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @NotNull @Override public Set<Entry<K, V>> entrySet() { return new EntrySet(); } VanillaSharedReplicatedHashMap(@NotNull SharedHashMapBuilder bu... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @NotNull @Override public Set<Entry<K, V>> entrySet() { return new EntrySet(); } VanillaSharedReplicatedHashMap(@NotNull SharedHashMapBuilder bu... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @NotNull @Override public Set<Entry<K, V>> entrySet() { return new EntrySet(); } VanillaSharedReplicatedHashMap(@NotNull SharedHashMapBuilder bu... |
@Test public void testPutIfAbsent() throws IOException { SharedHashMap map = map5(); map.putIfAbsent(JSR166TestCase.six, "Z"); assertTrue(map.containsKey(JSR166TestCase.six)); } | @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, timeProvider.currentTimeMillis()); } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... |
@Test public void testPutIfAbsent2() throws IOException { SharedHashMap map = map5(); final Object z = map.putIfAbsent(JSR166TestCase.one, "Z"); assertEquals("A", z); } | @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, timeProvider.currentTimeMillis()); } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... |
@Test public void testRemove() throws IOException { SharedHashMap map = map5(); map.remove(JSR166TestCase.five); assertEquals(4, map.size()); assertFalse(map.containsKey(JSR166TestCase.five)); } | @Override public V remove(final Object key) { return removeIfValueIs(key, null, localIdentifier, timeProvider.currentTimeMillis()); } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V remove(final Object key) { return removeIfValueIs(key, null, localIdentifier, timeProvider.currentTimeMillis()); } } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V remove(final Object key) { return removeIfValueIs(key, null, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSha... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V remove(final Object key) { return removeIfValueIs(key, null, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSha... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V remove(final Object key) { return removeIfValueIs(key, null, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSha... |
@Test public void testRemove2() throws IOException { SharedHashMap map = map5(); map.remove(JSR166TestCase.five, "E"); assertEquals(4, map.size()); assertFalse(map.containsKey(JSR166TestCase.five)); map.remove(JSR166TestCase.four, "A"); assertEquals(4, map.size()); assertTrue(map.containsKey(JSR166TestCase.four)); } | @Override public V remove(final Object key) { return removeIfValueIs(key, null, localIdentifier, timeProvider.currentTimeMillis()); } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V remove(final Object key) { return removeIfValueIs(key, null, localIdentifier, timeProvider.currentTimeMillis()); } } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V remove(final Object key) { return removeIfValueIs(key, null, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSha... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V remove(final Object key) { return removeIfValueIs(key, null, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSha... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V remove(final Object key) { return removeIfValueIs(key, null, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSha... |
@Test public void testPut1_NullPointerException() throws IOException { try { SharedHashMap c = newShmIntString(5); c.put(null, "whatever"); shouldThrow(); } catch (NullPointerException success) { } } | @Override public V put(K key, V value) { return put0(key, value, true, localIdentifier, timeProvider.currentTimeMillis()); } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V put(K key, V value) { return put0(key, value, true, localIdentifier, timeProvider.currentTimeMillis()); } } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V put(K key, V value) { return put0(key, value, true, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSharedReplic... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V put(K key, V value) { return put0(key, value, true, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSharedReplic... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V put(K key, V value) { return put0(key, value, true, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSharedReplic... |
@Test public void testPut2_NullPointerException() throws IOException { try { SharedHashMap c = newShmIntString(5); c.put(JSR166TestCase.notPresent, null); shouldThrow(); } catch (NullPointerException success) { } } | @Override public V put(K key, V value) { return put0(key, value, true, localIdentifier, timeProvider.currentTimeMillis()); } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V put(K key, V value) { return put0(key, value, true, localIdentifier, timeProvider.currentTimeMillis()); } } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V put(K key, V value) { return put0(key, value, true, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSharedReplic... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V put(K key, V value) { return put0(key, value, true, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSharedReplic... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V put(K key, V value) { return put0(key, value, true, localIdentifier, timeProvider.currentTimeMillis()); } VanillaSharedReplic... |
@Test public void testPutIfAbsent1_NullPointerException() throws IOException { try { SharedHashMap c = newShmIntString(5); c.putIfAbsent(null, "whatever"); shouldThrow(); } catch (NullPointerException success) { } } | @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, timeProvider.currentTimeMillis()); } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... |
@Test public void testPutIfAbsent2_NullPointerException() throws IOException { try { SharedHashMap c = newShmIntString(5); c.putIfAbsent(JSR166TestCase.notPresent, null); shouldThrow(); } catch (NullPointerException success) { } } | @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, timeProvider.currentTimeMillis()); } | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... | VanillaSharedReplicatedHashMap extends AbstractVanillaSharedHashMap<K, V> implements SharedHashMap<K, V>, ReplicaExternalizable<K, V>, EntryResolver<K, V>,
Closeable { @Override public V putIfAbsent(@net.openhft.lang.model.constraints.NotNull K key, V value) { return put0(key, value, false, localIdentifier, tim... |
@Test (enabled = true) public void testNoPlaceholderString() { underTest = new PlaceholderHandler(); String processedStr = (String) underTest.placeholderProcessString("pippo"); Assert.assertEquals(processedStr, "pippo"); } | public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toString()); outputObj = ... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... |
@Test public void testSimpleString() { underTest = new DataExtractionSupport(logUtils); String processedStr = underTest.process(getSimpleStringObject(), null, null); Assert.assertEquals(processedStr, getSimpleStringObject()); } | public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.class)) { outputStr = proc... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... |
@Test(expectedExceptions = { HeatException.class }, expectedExceptionsMessageRegExp = ".* actualValue/expectedValue belongs to class .* not supported") public void testNotSupportedObject() throws Exception { underTest = new DataExtractionSupport(logUtils); underTest.process(getNotSupportedClassObject(), null, null); } | public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.class)) { outputStr = proc... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... |
@Test public void testRegularExtractionMapObject() { underTest = new DataExtractionSupport(logUtils); String processedStr = underTest.process(getRegexpExtractionMapObject(), null, null); Assert.assertEquals(processedStr, "123"); } | public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.class)) { outputStr = proc... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... |
@Test public void testOccurrenceExtractionMapObject() { underTest = new DataExtractionSupport(logUtils); String processedStr = underTest.process(getOccurrenceOfMapObject(), null, null); Assert.assertEquals(processedStr, "2"); } | public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.class)) { outputStr = proc... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... |
@Test(expectedExceptions = { HeatException.class }, expectedExceptionsMessageRegExp = ".* configuration .* not supported") public void testNotSupportedMapObject() throws Exception { underTest = new DataExtractionSupport(logUtils); underTest.process(getNotSupportedMapObject(), null, null); } | public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.class)) { outputStr = proc... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... | DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.cl... |
@Test public void testSimpleValue() throws Exception { final List<Map<String, String>> parts = ImmutableList.of( ImmutableMap.of( TestCaseUtils.JSON_FIELD_MULTIPART_NAME, "simpleField", TestCaseUtils.JSON_FIELD_MULTIPART_VALUE, "simpleValue" ) ); final List<MultiPartSpecification> spec = MultipartUtils.convertToMultipa... | public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is mandatory", TestCa... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... |
@Test public void testMultipleValues() throws Exception { final List<Map<String, String>> parts = ImmutableList.of( ImmutableMap.of( TestCaseUtils.JSON_FIELD_MULTIPART_NAME, "simpleField", TestCaseUtils.JSON_FIELD_MULTIPART_VALUE, "simpleValue" ), ImmutableMap.of( TestCaseUtils.JSON_FIELD_MULTIPART_NAME, "simpleField",... | public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is mandatory", TestCa... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... |
@Test public void testFileWithNoMimetype() throws Exception { final List<Map<String, String>> parts = ImmutableList.of( ImmutableMap.of( TestCaseUtils.JSON_FIELD_MULTIPART_NAME, "upload", TestCaseUtils.JSON_FIELD_MULTIPART_FILE, "/files/multipart.something" ) ); try { MultipartUtils.convertToMultipart(parts); fail("It ... | public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is mandatory", TestCa... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... | MultipartUtils { public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) { return parts.stream() .map(part -> { final MultiPartSpecification specification; final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPART_NAME); Preconditions.checkNotNull(name, "'%s' for a part is m... |
@Test(enabled = true) public void testStringWithoutPlaceholder() { underTest = new SysPropHandler("[testPlaceholderWithoutSysPropName]"); String outputStr = underTest.processString("StringWithoutPlaceholder"); Assert.assertEquals(outputStr, "StringWithoutPlaceholder"); } | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testPlaceholderWithoutSysPropName() { underTest = new SysPropHandler("[testPlaceholderWithoutSysPropName]"); String inputString = SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "}"; String outputStr = underTest.processString(inputString); Assert.assertEquals(outputStr, inputString... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test (enabled = true) public void testGetPreloadSimpleString() { underTest = new PlaceholderHandler(); Map<String, Object> beforeSuiteVariables = new HashMap(); beforeSuiteVariables.put("preloadedVarName", "preloadedVarValue"); TestSuiteHandler.getInstance().getTestCaseUtils().setBeforeSuiteVariables(beforeSuiteVariab... | public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toString()); outputObj = ... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... |
@Test(enabled = true) public void testPlaceholderWithEmptySysPropName() { underTest = new SysPropHandler("[testPlaceholderWithEmptySysPropName]"); String inputString = SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "[]}"; String outputStr = underTest.processString(inputString); Assert.assertEquals(outputStr, input... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testPlaceholderWithoutSysPropName1() { underTest = new SysPropHandler("[testPlaceholderWithoutSysPropName1]"); String inputString = "STRING_" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "}_STRING"; String outputStr = underTest.processString(inputString); Assert.assertEquals(o... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testPlaceholderWithEmptySysPropName1() { underTest = new SysPropHandler("[testPlaceholderWithEmptySysPropName1]"); String inputString = "STRING_" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "[]}_STRING"; String outputStr = underTest.processString(inputString); Assert.assertEq... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testPlaceholderWithSysPropNotSetAndNoDefault() { underTest = new SysPropHandler("[testPlaceholderWithSysPropNotSetAndNoDefault]"); String inputString = SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "[" + PROPERTY_TO_TEST + "]}"; String outputStr = underTest.processString(inputStr... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testPlaceholderWithSysPropNotSetAndNoDefault1() { underTest = new SysPropHandler("[testPlaceholderWithSysPropNotSetAndNoDefault1]"); String inputString = "STRING_" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "[" + PROPERTY_TO_TEST + "]}_STRING"; String outputStr = underTest.p... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testPlaceholderWithSysPropSet() { System.setProperty(PROPERTY_TO_TEST, "PIPPO"); underTest = new SysPropHandler("[testPlaceholderWithSysPropSet]"); String inputString = SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "[" + PROPERTY_TO_TEST + "]}"; String outputStr = underTest.proce... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testPlaceholderWithSysPropSet1() { System.setProperty(PROPERTY_TO_TEST, "PIPPO"); underTest = new SysPropHandler("[testPlaceholderWithSysPropSet1]"); String inputString = "STRING_" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "[" + PROPERTY_TO_TEST + "]}_STRING"; String output... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testPlaceholderWithSysPropSetToDefault() { underTest = new SysPropHandler("[testPlaceholderWithSysPropSetToDefault]"); String inputString = SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "[" + PROPERTY_TO_TEST + ",pippo_default]}"; String outputStr = underTest.processString(inputS... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testPlaceholderWithSysPropSetToDefault1() { underTest = new SysPropHandler("[testPlaceholderWithSysPropSetToDefault1]"); String inputString = "STRING_" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "[" + PROPERTY_TO_TEST + ",pippo_default]}_STRING"; String outputStr = underTest... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testPlaceholderWithSysPropSetAndDefaultSet() { System.setProperty(PROPERTY_TO_TEST, "PIPPO"); underTest = new SysPropHandler("[testPlaceholderWithSysPropSetAndDefaultSet]"); String inputString = SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "[" + PROPERTY_TO_TEST + ", pippo_defau... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test (enabled = true) public void testGetPreloadComplexDefaultString() { underTest = new PlaceholderHandler(); Map<String, Object> beforeSuiteVariables = new HashMap(); Map<String, String> complexStructure = new HashMap(); complexStructure.put("DEFAULT", "default_value"); complexStructure.put("param1", "param1_value")... | public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toString()); outputObj = ... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... |
@Test(enabled = true) public void testPlaceholderWithSysPropSetAndDefaultSet1() { System.setProperty(PROPERTY_TO_TEST, "PIPPO"); underTest = new SysPropHandler("[testPlaceholderWithSysPropSetAndDefaultSet1]"); String inputString = "STRING_" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER + "[" + PROPERTY_TO_TEST + ... | public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder = processRegex(p... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... | SysPropHandler { public String processString(String inputString) { String outputString = inputString; try { if (inputString.contains(SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER)) { String patternForFormat = ".*?(\\$\\{" + SysPropHeatPlaceholderModule.SYS_PROP_PLACEHOLDER_KEYWORD + ".*?\\}).*?"; String placeholder... |
@Test(enabled = true) public void testGetPreloadNotExistentString() { underTest = new PlaceholderHandler(); Map<String, Object> beforeSuiteVariables = new HashMap(); beforeSuiteVariables.put("preloadedVarName", "preloadedVarValue"); TestSuiteHandler.getInstance().getTestCaseUtils().setBeforeSuiteVariables(beforeSuiteVa... | public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toString()); outputObj = ... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... | PlaceholderHandler { public Object placeholderProcessString(String inputStr) { logUtils.trace("inputStr = '{}'", inputStr); Object outputObj = inputStr; try { if (inputStr.contains(PLACEHOLDER_SYMBOL_BEGIN)) { outputObj = processGetStepPlaceholder(outputObj.toString()); outputObj = processPathPlaceholder(outputObj.toSt... |
@Test (enabled = true) public void testProcessHeaderPlaceholder() { underTest = new PlaceholderHandler(); underTest.setResponse(buildResponse()); String stringToProcess = "PIPPO_${header[test_header]}"; String output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test... | public String processHeaderPlaceholder(String inputString) { String outputString = inputString; if (response != null) { outputString = processGenericPlaceholders(inputString, REGEXP_HEADER_PLACEHOLDER, this::getHeaderVar); } return outputString; } | PlaceholderHandler { public String processHeaderPlaceholder(String inputString) { String outputString = inputString; if (response != null) { outputString = processGenericPlaceholders(inputString, REGEXP_HEADER_PLACEHOLDER, this::getHeaderVar); } return outputString; } } | PlaceholderHandler { public String processHeaderPlaceholder(String inputString) { String outputString = inputString; if (response != null) { outputString = processGenericPlaceholders(inputString, REGEXP_HEADER_PLACEHOLDER, this::getHeaderVar); } return outputString; } PlaceholderHandler(); } | PlaceholderHandler { public String processHeaderPlaceholder(String inputString) { String outputString = inputString; if (response != null) { outputString = processGenericPlaceholders(inputString, REGEXP_HEADER_PLACEHOLDER, this::getHeaderVar); } return outputString; } PlaceholderHandler(); Map<String, HeatPlaceholderMo... | PlaceholderHandler { public String processHeaderPlaceholder(String inputString) { String outputString = inputString; if (response != null) { outputString = processGenericPlaceholders(inputString, REGEXP_HEADER_PLACEHOLDER, this::getHeaderVar); } return outputString; } PlaceholderHandler(); Map<String, HeatPlaceholderMo... |
@Test (enabled = true) public void testProcessCookiePlaceholder() { underTest = new PlaceholderHandler(); underTest.setResponse(buildResponse()); String stringToProcess = "PIPPO_${cookie[test_cookie]}"; String output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test... | private String processCookiePlaceholder(String input) { String outputObj = input; if (response != null) { outputObj = processGenericPlaceholders(input, REGEXP_COOKIE_PLACEHOLDER, this::getCookieVar); } return outputObj; } | PlaceholderHandler { private String processCookiePlaceholder(String input) { String outputObj = input; if (response != null) { outputObj = processGenericPlaceholders(input, REGEXP_COOKIE_PLACEHOLDER, this::getCookieVar); } return outputObj; } } | PlaceholderHandler { private String processCookiePlaceholder(String input) { String outputObj = input; if (response != null) { outputObj = processGenericPlaceholders(input, REGEXP_COOKIE_PLACEHOLDER, this::getCookieVar); } return outputObj; } PlaceholderHandler(); } | PlaceholderHandler { private String processCookiePlaceholder(String input) { String outputObj = input; if (response != null) { outputObj = processGenericPlaceholders(input, REGEXP_COOKIE_PLACEHOLDER, this::getCookieVar); } return outputObj; } PlaceholderHandler(); Map<String, HeatPlaceholderModuleProvider> constructPro... | PlaceholderHandler { private String processCookiePlaceholder(String input) { String outputObj = input; if (response != null) { outputObj = processGenericPlaceholders(input, REGEXP_COOKIE_PLACEHOLDER, this::getCookieVar); } return outputObj; } PlaceholderHandler(); Map<String, HeatPlaceholderModuleProvider> constructPro... |
@Test (enabled = true) public void testGeneralMapAsInput() { underTest = new PlaceholderHandler(); Map<String, Object> beforeSuiteVariables = new HashMap(); beforeSuiteVariables.put("preloadedVarName", "preloadedVarValue"); TestSuiteHandler.getInstance().getTestCaseUtils().setBeforeSuiteVariables(beforeSuiteVariables);... | public Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap) { Map<String, Object> outputParams = requestParamsMap; if (requestParamsMap != null) { try { for (Map.Entry<String, Object> parameterObj : outputParams.entrySet()) { Object parameterValue = parameterObj.getValue(); logUtils.trace("pa... | PlaceholderHandler { public Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap) { Map<String, Object> outputParams = requestParamsMap; if (requestParamsMap != null) { try { for (Map.Entry<String, Object> parameterObj : outputParams.entrySet()) { Object parameterValue = parameterObj.getValue(... | PlaceholderHandler { public Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap) { Map<String, Object> outputParams = requestParamsMap; if (requestParamsMap != null) { try { for (Map.Entry<String, Object> parameterObj : outputParams.entrySet()) { Object parameterValue = parameterObj.getValue(... | PlaceholderHandler { public Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap) { Map<String, Object> outputParams = requestParamsMap; if (requestParamsMap != null) { try { for (Map.Entry<String, Object> parameterObj : outputParams.entrySet()) { Object parameterValue = parameterObj.getValue(... | PlaceholderHandler { public Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap) { Map<String, Object> outputParams = requestParamsMap; if (requestParamsMap != null) { try { for (Map.Entry<String, Object> parameterObj : outputParams.entrySet()) { Object parameterValue = parameterObj.getValue(... |
@Test (enabled = true) public void testProcessPlaceholders() { underTest = new PlaceholderHandler(); Map<String, Object> beforeSuiteVariables = new HashMap(); beforeSuiteVariables.put("preloadedVarName1", "preloadedVarValue1"); beforeSuiteVariables.put("preloadedVarName2", "preloadedVarValue2"); beforeSuiteVariables.pu... | public Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap) { Map<String, Object> outputParams = requestParamsMap; if (requestParamsMap != null) { try { for (Map.Entry<String, Object> parameterObj : outputParams.entrySet()) { Object parameterValue = parameterObj.getValue(); logUtils.trace("pa... | PlaceholderHandler { public Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap) { Map<String, Object> outputParams = requestParamsMap; if (requestParamsMap != null) { try { for (Map.Entry<String, Object> parameterObj : outputParams.entrySet()) { Object parameterValue = parameterObj.getValue(... | PlaceholderHandler { public Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap) { Map<String, Object> outputParams = requestParamsMap; if (requestParamsMap != null) { try { for (Map.Entry<String, Object> parameterObj : outputParams.entrySet()) { Object parameterValue = parameterObj.getValue(... | PlaceholderHandler { public Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap) { Map<String, Object> outputParams = requestParamsMap; if (requestParamsMap != null) { try { for (Map.Entry<String, Object> parameterObj : outputParams.entrySet()) { Object parameterValue = parameterObj.getValue(... | PlaceholderHandler { public Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap) { Map<String, Object> outputParams = requestParamsMap; if (requestParamsMap != null) { try { for (Map.Entry<String, Object> parameterObj : outputParams.entrySet()) { Object parameterValue = parameterObj.getValue(... |
@Test (enabled = true) public void testCompareEqualsFields() { underTest = new OperationHandler(getEqualsFieldsToCheck(), buildResponses()); boolean execution = underTest.execute(); Assert.assertTrue(execution); } | public boolean execute() { boolean isExecutionOk = true; if (!fieldsToCheck.containsKey(JSON_ELEM_ACTUAL_VALUE) || !fieldsToCheck.containsKey(JSON_ELEM_EXPECTED_VALUE)) { throw new HeatException("json input format not supported! '" + fieldsToCheck.toString() + "'"); } if (isComparingBlock()) { isExecutionOk &= multiple... | OperationHandler { public boolean execute() { boolean isExecutionOk = true; if (!fieldsToCheck.containsKey(JSON_ELEM_ACTUAL_VALUE) || !fieldsToCheck.containsKey(JSON_ELEM_EXPECTED_VALUE)) { throw new HeatException("json input format not supported! '" + fieldsToCheck.toString() + "'"); } if (isComparingBlock()) { isExec... | OperationHandler { public boolean execute() { boolean isExecutionOk = true; if (!fieldsToCheck.containsKey(JSON_ELEM_ACTUAL_VALUE) || !fieldsToCheck.containsKey(JSON_ELEM_EXPECTED_VALUE)) { throw new HeatException("json input format not supported! '" + fieldsToCheck.toString() + "'"); } if (isComparingBlock()) { isExec... | OperationHandler { public boolean execute() { boolean isExecutionOk = true; if (!fieldsToCheck.containsKey(JSON_ELEM_ACTUAL_VALUE) || !fieldsToCheck.containsKey(JSON_ELEM_EXPECTED_VALUE)) { throw new HeatException("json input format not supported! '" + fieldsToCheck.toString() + "'"); } if (isComparingBlock()) { isExec... | OperationHandler { public boolean execute() { boolean isExecutionOk = true; if (!fieldsToCheck.containsKey(JSON_ELEM_ACTUAL_VALUE) || !fieldsToCheck.containsKey(JSON_ELEM_EXPECTED_VALUE)) { throw new HeatException("json input format not supported! '" + fieldsToCheck.toString() + "'"); } if (isComparingBlock()) { isExec... |
@Test(enabled = true, expectedExceptions = HeatException.class) public void testCompareDifferentFields() { underTest = new OperationHandler(getDifferentFieldsToCheck(), buildResponses()); underTest.execute(); } | public boolean execute() { boolean isExecutionOk = true; if (!fieldsToCheck.containsKey(JSON_ELEM_ACTUAL_VALUE) || !fieldsToCheck.containsKey(JSON_ELEM_EXPECTED_VALUE)) { throw new HeatException("json input format not supported! '" + fieldsToCheck.toString() + "'"); } if (isComparingBlock()) { isExecutionOk &= multiple... | OperationHandler { public boolean execute() { boolean isExecutionOk = true; if (!fieldsToCheck.containsKey(JSON_ELEM_ACTUAL_VALUE) || !fieldsToCheck.containsKey(JSON_ELEM_EXPECTED_VALUE)) { throw new HeatException("json input format not supported! '" + fieldsToCheck.toString() + "'"); } if (isComparingBlock()) { isExec... | OperationHandler { public boolean execute() { boolean isExecutionOk = true; if (!fieldsToCheck.containsKey(JSON_ELEM_ACTUAL_VALUE) || !fieldsToCheck.containsKey(JSON_ELEM_EXPECTED_VALUE)) { throw new HeatException("json input format not supported! '" + fieldsToCheck.toString() + "'"); } if (isComparingBlock()) { isExec... | OperationHandler { public boolean execute() { boolean isExecutionOk = true; if (!fieldsToCheck.containsKey(JSON_ELEM_ACTUAL_VALUE) || !fieldsToCheck.containsKey(JSON_ELEM_EXPECTED_VALUE)) { throw new HeatException("json input format not supported! '" + fieldsToCheck.toString() + "'"); } if (isComparingBlock()) { isExec... | OperationHandler { public boolean execute() { boolean isExecutionOk = true; if (!fieldsToCheck.containsKey(JSON_ELEM_ACTUAL_VALUE) || !fieldsToCheck.containsKey(JSON_ELEM_EXPECTED_VALUE)) { throw new HeatException("json input format not supported! '" + fieldsToCheck.toString() + "'"); } if (isComparingBlock()) { isExec... |
@Test public void testNewUser() throws Exception { PersonService personService = mock(PersonService.class); IdentifierGenerator identifierGenerator = mock(IdentifierGenerator.class); UserService userService = mock(UserService.class); Role role = mock(Role.class); PersonAttributeType phoneNumberAttributeType = new Perso... | public User newUser(WebStaff webStaff) { User user = new User(); user.setSystemId(identifierGenerator.generateStaffId()); user.setGender(MotechConstants.GENDER_UNKNOWN_OPENMRS); PersonName name = new PersonName(webStaff.getFirstName(), null, webStaff.getLastName()); user.addName(name); String phoneValue = webStaff.getP... | MotechUserRepository { public User newUser(WebStaff webStaff) { User user = new User(); user.setSystemId(identifierGenerator.generateStaffId()); user.setGender(MotechConstants.GENDER_UNKNOWN_OPENMRS); PersonName name = new PersonName(webStaff.getFirstName(), null, webStaff.getLastName()); user.addName(name); String pho... | MotechUserRepository { public User newUser(WebStaff webStaff) { User user = new User(); user.setSystemId(identifierGenerator.generateStaffId()); user.setGender(MotechConstants.GENDER_UNKNOWN_OPENMRS); PersonName name = new PersonName(webStaff.getFirstName(), null, webStaff.getLastName()); user.addName(name); String pho... | MotechUserRepository { public User newUser(WebStaff webStaff) { User user = new User(); user.setSystemId(identifierGenerator.generateStaffId()); user.setGender(MotechConstants.GENDER_UNKNOWN_OPENMRS); PersonName name = new PersonName(webStaff.getFirstName(), null, webStaff.getLastName()); user.addName(name); String pho... | MotechUserRepository { public User newUser(WebStaff webStaff) { User user = new User(); user.setSystemId(identifierGenerator.generateStaffId()); user.setGender(MotechConstants.GENDER_UNKNOWN_OPENMRS); PersonName name = new PersonName(webStaff.getFirstName(), null, webStaff.getLastName()); user.addName(name); String pho... |
@Test public void defaultersAlertCountShouldBeIncreasedForExistingAlerts() { String[] careGroups = new String[]{"ANC","TT1"}; List<Facility> facilities = facilitiesFor("Central Region"); Patient patient = new Patient(1); ExpectedEncounter enc = new ExpectedEncounter(); enc.setId(1L); enc.setPatient(patient); enc.setNam... | public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEnabled && isMessageTimeWithinBlackoutPeriod(deliveryDate); ... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... |
@Test public void onlyAttemptCountShouldBeIncrementedIfAlertNotDelivered() { String[] careGroups = new String[]{"ANC","TT1"}; List<Facility> facilities = facilitiesFor("Central Region"); Patient patient = new Patient(1); ExpectedEncounter enc = new ExpectedEncounter(); enc.setId(1L); enc.setPatient(patient); enc.setNam... | public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEnabled && isMessageTimeWithinBlackoutPeriod(deliveryDate); ... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... |
@Test public void testSendStaffCareMessagesGroupByCommunity() { Date forDate = new Date(); String careGroups[] = {"ANC", "TT", "IPT"}; Location location = new Location(); location.setName("Test Facility"); location.setRegion("Upper East"); location.setCountyDistrict(new KassenaNankana().toString()); Facility facility =... | public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEnabled && isMessageTimeWithinBlackoutPeriod(deliveryDate); ... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... |
@Test public void testShouldSendUpcomingCareMessageWhenThereAreUpcomingExpectedEncounters() { Date forDate = new Date(); String careGroups[] = {"ANC", "TT", "IPT"}; Location location = new Location(); location.setName("Test Facility"); location.setCountyDistrict(new KassenaNankana().toString()); location.setRegion("Tes... | public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEnabled && isMessageTimeWithinBlackoutPeriod(deliveryDate); ... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... |
@Test public void testSendStaffCareMessagesWhenNoDefaulters() { Date forDate = new Date(); String careGroups[] = {"ANC", "TT", "IPT"}; Location location = new Location(); location.setName("Test Facility"); Facility facility = new Facility(); facility.setLocation(location); facility.setPhoneNumber("+1 555 123-1234"); Li... | public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEnabled && isMessageTimeWithinBlackoutPeriod(deliveryDate); ... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... |
@Test public void testShouldSendNoUpcomingCareMessagesWhenThereAreNoUpcomingExpectedEncounters() { Date forDate = new Date(); String careGroups[] = {"ANC", "TT", "IPT"}; Location location = new Location(); location.setName("Test Facility"); Facility facility = new Facility(); facility.setLocation(location); facility.se... | public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEnabled && isMessageTimeWithinBlackoutPeriod(deliveryDate); ... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... |
@Test public void testShouldFindOutIfMessageTimeIsDuringBlackoutPeriod() { DateUtil dateUtil = new DateUtil(); Calendar calendar = dateUtil.getCalendarWithTime(23, 13, 54); Date morningMessageTime = calendar.getTime(); calendar = dateUtil.getCalendarWithTime(3, 13, 54); Date nightMessageTime = calendar.getTime(); calen... | boolean isMessageTimeWithinBlackoutPeriod(Date deliveryDate) { Date checkForDate = (deliveryDate != null ? deliveryDate : new Date()); Blackout blackout = motechService().getBlackoutSettings(); if (blackout == null) { return false; } Calendar blackoutCalendar = new DateUtil().calendarFor(checkForDate); adjustForBlackou... | StaffMessageServiceImpl implements StaffMessageService { boolean isMessageTimeWithinBlackoutPeriod(Date deliveryDate) { Date checkForDate = (deliveryDate != null ? deliveryDate : new Date()); Blackout blackout = motechService().getBlackoutSettings(); if (blackout == null) { return false; } Calendar blackoutCalendar = n... | StaffMessageServiceImpl implements StaffMessageService { boolean isMessageTimeWithinBlackoutPeriod(Date deliveryDate) { Date checkForDate = (deliveryDate != null ? deliveryDate : new Date()); Blackout blackout = motechService().getBlackoutSettings(); if (blackout == null) { return false; } Calendar blackoutCalendar = n... | StaffMessageServiceImpl implements StaffMessageService { boolean isMessageTimeWithinBlackoutPeriod(Date deliveryDate) { Date checkForDate = (deliveryDate != null ? deliveryDate : new Date()); Blackout blackout = motechService().getBlackoutSettings(); if (blackout == null) { return false; } Calendar blackoutCalendar = n... | StaffMessageServiceImpl implements StaffMessageService { boolean isMessageTimeWithinBlackoutPeriod(Date deliveryDate) { Date checkForDate = (deliveryDate != null ? deliveryDate : new Date()); Blackout blackout = motechService().getBlackoutSettings(); if (blackout == null) { return false; } Calendar blackoutCalendar = n... |
@Test public void testShouldSendDefaulterMessagesToAllPhoneNumbersOfAFacility() { Date forDate = new Date(); String careGroups[] = {"ANC", "TT", "IPT"}; Location location = new Location(); location.setName("Test Facility"); location.setRegion("Upper East"); location.setCountyDistrict(new KassenaNankana().toString()); F... | public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEnabled && isMessageTimeWithinBlackoutPeriod(deliveryDate); ... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... |
@Test public void shouldNotSendDefaulterMessagesIfTaskSoConfigured() { Date forDate = new Date(); String careGroups[] = {"ANC", "TT", "IPT"}; Location location = new Location(); location.setName("Test Facility"); location.setRegion("Upper East"); location.setCountyDistrict(new KassenaNankana().toString()); Facility fac... | public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEnabled && isMessageTimeWithinBlackoutPeriod(deliveryDate); ... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... | StaffMessageServiceImpl implements StaffMessageService { public void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage) { final boolean shouldBlackOut = blackoutEna... |
@Test public void shouldCreateMotherRelationshipIfNoneExists() { Person mother = new Person(1); Person child = new Person(2); List<Relationship> emptyRelationships = new ArrayList<Relationship>(); Relationship relationship = new Relationship(mother, child, relationshipType); relationship.setId(1); expect(contextService... | public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolean motherRelationshipEdited = mother != null && motherRela... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... |
@Test public void shouldRetrieveUserTypes() { MotechUserRepository repository = new MotechUserRepository(null, null, null, motechUsers); MotechUserTypes userTypes = repository.userTypes(); assertTrue(userTypes.hasTypes(2)); assertTrue(userTypes.hasType("CHO")); assertTrue(userTypes.hasType("CHN")); } | public MotechUserTypes userTypes() { return motechUsers.types(); } | MotechUserRepository { public MotechUserTypes userTypes() { return motechUsers.types(); } } | MotechUserRepository { public MotechUserTypes userTypes() { return motechUsers.types(); } MotechUserRepository(IdentifierGenerator identifierGenerator, UserService userService, PersonService personService, MotechUsers motechUsers); } | MotechUserRepository { public MotechUserTypes userTypes() { return motechUsers.types(); } MotechUserRepository(IdentifierGenerator identifierGenerator, UserService userService, PersonService personService, MotechUsers motechUsers); User newUser(WebStaff webStaff); User updateUser(User staff, WebStaff webStaff); MotechU... | MotechUserRepository { public MotechUserTypes userTypes() { return motechUsers.types(); } MotechUserRepository(IdentifierGenerator identifierGenerator, UserService userService, PersonService personService, MotechUsers motechUsers); User newUser(WebStaff webStaff); User updateUser(User staff, WebStaff webStaff); MotechU... |
@Test public void shouldEditExistingMotherChildRelationship() { Person mother = new Person(1); Person oldMother = new Person(4); Person child = new Person(2); List<Relationship> oldRelationships = new ArrayList<Relationship>(); Relationship oldRelationship = new Relationship(oldMother, child, relationshipType); oldRela... | public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolean motherRelationshipEdited = mother != null && motherRela... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... |
@Test public void shouldNotVoidMotherChildRelationship() { Person oldMother = new Person(4); Person child = new Person(2); List<Relationship> oldRelationships = new ArrayList<Relationship>(); Relationship oldRelationship = new Relationship(oldMother, child, relationshipType); oldRelationship.setId(1); oldRelationships.... | public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolean motherRelationshipEdited = mother != null && motherRela... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... | RelationshipServiceImpl implements RelationshipService { public Relationship saveOrUpdateMotherRelationship(Person mother, Person child, Boolean canVoidRelationship) { Relationship motherRelationship = getMotherRelationship(child); boolean motherRelationshipCreated = mother != null && motherRelationship == null; boolea... |
@Test public void testGetRegions() throws Exception { ContextService contextService = createMock(ContextService.class); MotechService motechService = createMock(MotechService.class); JSONLocationSerializer JSONLocationSerializer = new JSONLocationSerializer(); JSONLocationSerializer.setContextService(contextService); d... | @ModelAttribute("regions") public List<String> getRegions() { return JSONLocationSerializer.getAllRegions(); } | DemoPatientController extends BasePatientController { @ModelAttribute("regions") public List<String> getRegions() { return JSONLocationSerializer.getAllRegions(); } } | DemoPatientController extends BasePatientController { @ModelAttribute("regions") public List<String> getRegions() { return JSONLocationSerializer.getAllRegions(); } } | DemoPatientController extends BasePatientController { @ModelAttribute("regions") public List<String> getRegions() { return JSONLocationSerializer.getAllRegions(); } @Autowired void setContextService(ContextService contextService); void setRegistrarBean(RegistrarBean registrarBean); void setWebModelConverter(WebModelCo... | DemoPatientController extends BasePatientController { @ModelAttribute("regions") public List<String> getRegions() { return JSONLocationSerializer.getAllRegions(); } @Autowired void setContextService(ContextService contextService); void setRegistrarBean(RegistrarBean registrarBean); void setWebModelConverter(WebModelCo... |
@Test public void testGetDistricts() throws Exception { ContextService contextService = createMock(ContextService.class); MotechService motechService = createMock(MotechService.class); JSONLocationSerializer JSONLocationSerializer = new JSONLocationSerializer(); JSONLocationSerializer.setContextService(contextService);... | @ModelAttribute("districts") public List<String> getDistricts() { return JSONLocationSerializer.getAllDistricts(); } | DemoPatientController extends BasePatientController { @ModelAttribute("districts") public List<String> getDistricts() { return JSONLocationSerializer.getAllDistricts(); } } | DemoPatientController extends BasePatientController { @ModelAttribute("districts") public List<String> getDistricts() { return JSONLocationSerializer.getAllDistricts(); } } | DemoPatientController extends BasePatientController { @ModelAttribute("districts") public List<String> getDistricts() { return JSONLocationSerializer.getAllDistricts(); } @Autowired void setContextService(ContextService contextService); void setRegistrarBean(RegistrarBean registrarBean); void setWebModelConverter(WebM... | DemoPatientController extends BasePatientController { @ModelAttribute("districts") public List<String> getDistricts() { return JSONLocationSerializer.getAllDistricts(); } @Autowired void setContextService(ContextService contextService); void setRegistrarBean(RegistrarBean registrarBean); void setWebModelConverter(WebM... |
@Test public void testGetCommunities() throws Exception { ContextService contextService = createMock(ContextService.class); MotechService motechService = createMock(MotechService.class); JSONLocationSerializer JSONLocationSerializer = new JSONLocationSerializer(); JSONLocationSerializer.setContextService(contextService... | @ModelAttribute("communities") public List<Community> getCommunities() { return JSONLocationSerializer.getAllCommunities(false); } | DemoPatientController extends BasePatientController { @ModelAttribute("communities") public List<Community> getCommunities() { return JSONLocationSerializer.getAllCommunities(false); } } | DemoPatientController extends BasePatientController { @ModelAttribute("communities") public List<Community> getCommunities() { return JSONLocationSerializer.getAllCommunities(false); } } | DemoPatientController extends BasePatientController { @ModelAttribute("communities") public List<Community> getCommunities() { return JSONLocationSerializer.getAllCommunities(false); } @Autowired void setContextService(ContextService contextService); void setRegistrarBean(RegistrarBean registrarBean); void setWebModel... | DemoPatientController extends BasePatientController { @ModelAttribute("communities") public List<Community> getCommunities() { return JSONLocationSerializer.getAllCommunities(false); } @Autowired void setContextService(ContextService contextService); void setRegistrarBean(RegistrarBean registrarBean); void setWebModel... |
@Test public void shouldPopulateWithLocationDataWhenShowingNewFacilityForm() { Location l1 = getLocation("C1", "R1", "D1", "P1"); Location l2 = getLocation("C1", "R1", "D2", "P2"); Location l3 = getLocation("C1", "R2", "D3", "P3"); Location l4 = getLocation("C1", "R2", "D4", "P4"); when(locationService.getAllLocations(... | @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.GET) public String viewAddFacilityForm(ModelMap modelMap){ populateLocation(modelMap); modelMap.addAttribute("facility", new WebFacility()); return "/module/motechmodule/addfacility"; } | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.GET) public String viewAddFacilityForm(ModelMap modelMap){ populateLocation(modelMap); modelMap.addAttribute("facility", new WebFacility()); return "/module/motechmodule/addfacility"; } } | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.GET) public String viewAddFacilityForm(ModelMap modelMap){ populateLocation(modelMap); modelMap.addAttribute("facility", new WebFacility()); return "/module/motechmodule/addfacility"; } FacilityController(); Fa... | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.GET) public String viewAddFacilityForm(ModelMap modelMap){ populateLocation(modelMap); modelMap.addAttribute("facility", new WebFacility()); return "/module/motechmodule/addfacility"; } FacilityController(); Fa... | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.GET) public String viewAddFacilityForm(ModelMap modelMap){ populateLocation(modelMap); modelMap.addAttribute("facility", new WebFacility()); return "/module/motechmodule/addfacility"; } FacilityController(); Fa... |
@Test public void shouldFetchLocationDataInCaseOfDuplicateLocationError() { ModelMap modelMap = new ModelMap(); when(webFacility.getFacility()).thenReturn(facility); when(webFacility.getName()).thenReturn("name"); when(facility.getLocation()).thenReturn(location); when(motechService.getLocationByName("name")).thenRetur... | @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.POST) public String submitAddFacility(@ModelAttribute("facility") WebFacility facility, Errors errors,ModelMap modelMap, SessionStatus status){ if(contextService.getMotechService().getLocationByName(facility.getName()) != null){ err... | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.POST) public String submitAddFacility(@ModelAttribute("facility") WebFacility facility, Errors errors,ModelMap modelMap, SessionStatus status){ if(contextService.getMotechService().getLocationByName(facility.get... | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.POST) public String submitAddFacility(@ModelAttribute("facility") WebFacility facility, Errors errors,ModelMap modelMap, SessionStatus status){ if(contextService.getMotechService().getLocationByName(facility.get... | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.POST) public String submitAddFacility(@ModelAttribute("facility") WebFacility facility, Errors errors,ModelMap modelMap, SessionStatus status){ if(contextService.getMotechService().getLocationByName(facility.get... | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.POST) public String submitAddFacility(@ModelAttribute("facility") WebFacility facility, Errors errors,ModelMap modelMap, SessionStatus status){ if(contextService.getMotechService().getLocationByName(facility.get... |
@Test public void shouldSaveNewLocationForNoErrors() { ModelMap modelMap = new ModelMap(); when(webFacility.getFacility()).thenReturn(facility); when(webFacility.getName()).thenReturn("name"); when(facility.getLocation()).thenReturn(location); when(motechService.getLocationByName("name")).thenReturn(null); when(errors.... | @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.POST) public String submitAddFacility(@ModelAttribute("facility") WebFacility facility, Errors errors,ModelMap modelMap, SessionStatus status){ if(contextService.getMotechService().getLocationByName(facility.getName()) != null){ err... | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.POST) public String submitAddFacility(@ModelAttribute("facility") WebFacility facility, Errors errors,ModelMap modelMap, SessionStatus status){ if(contextService.getMotechService().getLocationByName(facility.get... | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.POST) public String submitAddFacility(@ModelAttribute("facility") WebFacility facility, Errors errors,ModelMap modelMap, SessionStatus status){ if(contextService.getMotechService().getLocationByName(facility.get... | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.POST) public String submitAddFacility(@ModelAttribute("facility") WebFacility facility, Errors errors,ModelMap modelMap, SessionStatus status){ if(contextService.getMotechService().getLocationByName(facility.get... | FacilityController { @RequestMapping(value = "/module/motechmodule/addfacility.form", method = RequestMethod.POST) public String submitAddFacility(@ModelAttribute("facility") WebFacility facility, Errors errors,ModelMap modelMap, SessionStatus status){ if(contextService.getMotechService().getLocationByName(facility.get... |
@Test public void shouldRenderTheCorrectPage() { expect(contextService.getMotechService()).andReturn(motechService); expect(motechService.getAllFacilities()).andReturn(Collections.<Facility>emptyList()); expect(motechService.getAllLanguages()).andReturn(Collections.<MessageLanguage>emptyList()); replay(contextService, ... | @RequestMapping(value = VIEW, method = RequestMethod.GET) public ModelAndView render() { ModelAndView modelAndView = new ModelAndView(VIEW, "bulkMessage", new WebBulkMessage()); locationSerializer.populateJavascriptMaps(modelAndView.getModelMap()); return modelAndView; } | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.GET) public ModelAndView render() { ModelAndView modelAndView = new ModelAndView(VIEW, "bulkMessage", new WebBulkMessage()); locationSerializer.populateJavascriptMaps(modelAndView.getModelMap()); return modelAndView; } } | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.GET) public ModelAndView render() { ModelAndView modelAndView = new ModelAndView(VIEW, "bulkMessage", new WebBulkMessage()); locationSerializer.populateJavascriptMaps(modelAndView.getModelMap()); return modelAndView; } } | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.GET) public ModelAndView render() { ModelAndView modelAndView = new ModelAndView(VIEW, "bulkMessage", new WebBulkMessage()); locationSerializer.populateJavascriptMaps(modelAndView.getModelMap()); return modelAndView; } @RequestMapping(value = VIEW, m... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.GET) public ModelAndView render() { ModelAndView modelAndView = new ModelAndView(VIEW, "bulkMessage", new WebBulkMessage()); locationSerializer.populateJavascriptMaps(modelAndView.getModelMap()); return modelAndView; } @RequestMapping(value = VIEW, m... |
@Test public void shouldSendSMS() { expect(contextService.getMotechService()).andReturn(motechService); expect(motechService.getAllFacilities()).andReturn(Collections.<Facility>emptyList()); expect(motechService.getAllLanguages()).andReturn(Collections.<MessageLanguage>emptyList()); WebBulkMessage message = new WebBulk... | @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; for (i = 0; i < ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... |
@Test @SkipBaseSetup public void testMessageProgramUpdate() throws InterruptedException { MessageProgramUpdateTask task = new MessageProgramUpdateTask(); TaskDefinition definition = new TaskDefinition(); definition.setProperty(MotechConstants.TASK_PROPERTY_BATCH_SIZE, "10"); task.initialize(definition); Integer patient... | @Override public void execute() { long start = System.currentTimeMillis(); log.info("Message Program Task - Update Enrolled Programs for all Patients"); Integer batchSize = null; String batchSizeProperty = taskDefinition.getProperty(MotechConstants.TASK_PROPERTY_BATCH_SIZE); if (batchSizeProperty != null) { try { batch... | MessageProgramUpdateTask extends AbstractTask { @Override public void execute() { long start = System.currentTimeMillis(); log.info("Message Program Task - Update Enrolled Programs for all Patients"); Integer batchSize = null; String batchSizeProperty = taskDefinition.getProperty(MotechConstants.TASK_PROPERTY_BATCH_SIZ... | MessageProgramUpdateTask extends AbstractTask { @Override public void execute() { long start = System.currentTimeMillis(); log.info("Message Program Task - Update Enrolled Programs for all Patients"); Integer batchSize = null; String batchSizeProperty = taskDefinition.getProperty(MotechConstants.TASK_PROPERTY_BATCH_SIZ... | MessageProgramUpdateTask extends AbstractTask { @Override public void execute() { long start = System.currentTimeMillis(); log.info("Message Program Task - Update Enrolled Programs for all Patients"); Integer batchSize = null; String batchSizeProperty = taskDefinition.getProperty(MotechConstants.TASK_PROPERTY_BATCH_SIZ... | MessageProgramUpdateTask extends AbstractTask { @Override public void execute() { long start = System.currentTimeMillis(); log.info("Message Program Task - Update Enrolled Programs for all Patients"); Integer batchSize = null; String batchSizeProperty = taskDefinition.getProperty(MotechConstants.TASK_PROPERTY_BATCH_SIZ... |
@Test public void shouldSendSeparateRequestsForEveryTenSMS() { expect(contextService.getMotechService()).andReturn(motechService); expect(motechService.getAllFacilities()).andReturn(Collections.<Facility>emptyList()); expect(motechService.getAllLanguages()).andReturn(Collections.<MessageLanguage>emptyList()); WebBulkMe... | @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; for (i = 0; i < ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... |
@Test public void ifOneBatchFailsResultIsFailed() { expect(contextService.getMotechService()).andReturn(motechService); expect(motechService.getAllFacilities()).andReturn(Collections.<Facility>emptyList()); expect(motechService.getAllLanguages()).andReturn(Collections.<MessageLanguage>emptyList()); WebBulkMessage messa... | @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; for (i = 0; i < ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... | SMSController { @RequestMapping(value = VIEW, method = RequestMethod.POST) public ModelAndView send(@ModelAttribute WebBulkMessage bulkMessage) { String recipients = bulkMessage.getRecipients(); String[] individualRecipients = recipients.split(","); MessageStatus statusOfAllBatches = MessageStatus.REJECTED; int i = 0; ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.