@Test public void shouldChangeTheValueOfAProperty() { cut.execute(exemplaryProperty1Change); assertThat(exemplaryProperty1.get()).isEqualTo("changed value"); }
@Override public void execute(final SetPropertyValue command) { @SuppressWarnings("unchecked") final Property<Object> property = (Property<Object>) objectRegistry.getByIdOrFail(command.getPropertyId()); changeExecutor.execute(property, new Runnable() { @Override public void run() { property.setValue(valueMapper.map(command.getValue())); } }); }
SimpleSingleValuePropertyCommandExecutor implements SingleValuePropertyCommandExecutor { @Override public void execute(final SetPropertyValue command) { @SuppressWarnings("unchecked") final Property<Object> property = (Property<Object>) objectRegistry.getByIdOrFail(command.getPropertyId()); changeExecutor.execute(property, new Runnable() { @Override public void run() { property.setValue(valueMapper.map(command.getValue())); } }); } }
SimpleSingleValuePropertyCommandExecutor implements SingleValuePropertyCommandExecutor { @Override public void execute(final SetPropertyValue command) { @SuppressWarnings("unchecked") final Property<Object> property = (Property<Object>) objectRegistry.getByIdOrFail(command.getPropertyId()); changeExecutor.execute(property, new Runnable() { @Override public void run() { property.setValue(valueMapper.map(command.getValue())); } }); } SimpleSingleValuePropertyCommandExecutor(final WeakObjectRegistry objectRegistry,
            final SilentChangeExecutor changeExecutor, final ValueMapper valueMapper); }
SimpleSingleValuePropertyCommandExecutor implements SingleValuePropertyCommandExecutor { @Override public void execute(final SetPropertyValue command) { @SuppressWarnings("unchecked") final Property<Object> property = (Property<Object>) objectRegistry.getByIdOrFail(command.getPropertyId()); changeExecutor.execute(property, new Runnable() { @Override public void run() { property.setValue(valueMapper.map(command.getValue())); } }); } SimpleSingleValuePropertyCommandExecutor(final WeakObjectRegistry objectRegistry,
            final SilentChangeExecutor changeExecutor, final ValueMapper valueMapper); @Override void execute(final SetPropertyValue command); }
SimpleSingleValuePropertyCommandExecutor implements SingleValuePropertyCommandExecutor { @Override public void execute(final SetPropertyValue command) { @SuppressWarnings("unchecked") final Property<Object> property = (Property<Object>) objectRegistry.getByIdOrFail(command.getPropertyId()); changeExecutor.execute(property, new Runnable() { @Override public void run() { property.setValue(valueMapper.map(command.getValue())); } }); } SimpleSingleValuePropertyCommandExecutor(final WeakObjectRegistry objectRegistry,
            final SilentChangeExecutor changeExecutor, final ValueMapper valueMapper); @Override void execute(final SetPropertyValue command);  }