All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lordofthejars.nosqlunit.elasticsearch.DefaultElasticsearchComparisonStrategy Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.lordofthejars.nosqlunit.elasticsearch;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

import org.elasticsearch.client.Client;

import com.lordofthejars.nosqlunit.core.NoSqlAssertionError;
import com.lordofthejars.nosqlunit.elasticsearch.parser.DataReader;

public class DefaultElasticsearchComparisonStrategy implements ElasticsearchComparisonStrategy {

	@Override
	public boolean compare(ElasticsearchConnectionCallback connection, InputStream dataset) throws NoSqlAssertionError,
			Throwable {
		Client nodeClient = connection.nodeClient();
		List> documents = DataReader.getDocuments(dataset);
		ElasticsearchAssertion.strictAssertEquals(documents, nodeClient);
		return true;
	}

    @Override
    public void setIgnoreProperties(String[] ignoreProperties) {
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy