com.noenv.wiremongo.mapping.find.FindOneAndReplaceBase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vertx-wiremongo Show documentation
Show all versions of vertx-wiremongo Show documentation
Lightweight mongo mocking for Vert.x
package com.noenv.wiremongo.mapping.find;
import com.noenv.wiremongo.command.find.FindOneAndReplaceBaseCommand;
import com.noenv.wiremongo.mapping.replace.WithReplace;
import io.vertx.core.json.JsonObject;
@SuppressWarnings("squid:MaximumInheritanceDepth")
public abstract class FindOneAndReplaceBase> extends WithReplace {
public FindOneAndReplaceBase() {
this("findOneAndReplace");
}
public FindOneAndReplaceBase(String method) {
super(method);
}
public FindOneAndReplaceBase(JsonObject json) {
super(json);
}
@Override
public C returns(final JsonObject response) {
return super.stub(c -> null == response ? null : response.copy());
}
@Override
protected JsonObject parseResponse(Object jsonValue) {
return (JsonObject) jsonValue;
}
}