use of com.mongodb.operation.FindOperation in project incubator-skywalking by apache.
the class MongoDBMethodInterceptorTest method setUp.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Before
public void setUp() throws Exception {
interceptor = new MongoDBMethodInterceptor();
Config.Plugin.MongoDB.TRACE_PARAM = true;
when(enhancedInstance.getSkyWalkingDynamicField()).thenReturn("127.0.0.1:27017");
BsonDocument document = new BsonDocument();
document.append("name", new BsonString("by"));
MongoNamespace mongoNamespace = new MongoNamespace("test.user");
Decoder decoder = PowerMockito.mock(Decoder.class);
FindOperation findOperation = new FindOperation(mongoNamespace, decoder);
findOperation.filter(document);
arguments = new Object[] { findOperation };
argumentTypes = new Class[] { findOperation.getClass() };
}
Aggregations