Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
added typeExist
Browse files Browse the repository at this point in the history
  • Loading branch information
happyprg committed May 29, 2014
1 parent 129ea06 commit 153357c
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package io.searchbox.indices.type;

import static junit.framework.Assert.assertEquals;

import org.junit.Test;

/**
* @author happyprg([email protected])
*/
public class TypeExistTest {

private static final String REQUEST_METHOD = "HEAD";
private static final String INDEX_NAME = "happyprg";
private static final String INDEX_TYPE_NAME = "seohoo";

@Test
public void typeExists() {

TypeExist typeExist = new TypeExist.Builder(INDEX_NAME).addType(INDEX_TYPE_NAME).build();

assertEquals(REQUEST_METHOD, typeExist.getRestMethodName());
assertEquals(INDEX_NAME + "/" + INDEX_TYPE_NAME, typeExist.getURI());
}
}

0 comments on commit 153357c

Please sign in to comment.