MCPcopy Create free account
hub / github.com/Neop/mudmap2 / testMatchKeywords

Method testMatchKeywords

src/test/java/mudmap2/backend/PlaceTest.java:877–908  ·  view source on GitHub ↗

Test of matchKeywords method, of class Place.

()

Source from the content-addressed store, hash-verified

875 * Test of matchKeywords method, of class Place.
876 */
877 @Test
878 public void testMatchKeywords() {
879 System.out.println("matchKeywords");
880
881 Place instance = new Place("Sea near a forest", 1, 2, layer);
882 instance.setComments("This is a small place, Small house next the trees");
883
884 String[] keywords = null;
885 boolean result = instance.matchKeywords(keywords);
886 assertFalse(result);
887
888 keywords = new String[1];
889 keywords[0] = "Forest";
890 result = instance.matchKeywords(keywords);
891 assertTrue(result);
892
893 keywords = new String[1];
894 keywords[0] = "car";
895 result = instance.matchKeywords(keywords);
896 assertFalse(result);
897
898 keywords = new String[2];
899 keywords[0] = "Forest";
900 keywords[1] = "car";
901 result = instance.matchKeywords(keywords);
902 assertFalse(result);
903
904 keywords = new String[1];
905 keywords[0] = "small";
906 result = instance.matchKeywords(keywords);
907 assertTrue(result);
908 }
909
910 /**
911 * Test of duplicate method, of class Place.

Callers

nothing calls this directly

Calls 2

setCommentsMethod · 0.95
matchKeywordsMethod · 0.95

Tested by

no test coverage detected