org.hamcrest.core.Every Java Examples
The following examples show how to use
org.hamcrest.core.Every.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PathPrunnerTest.java From yang2swagger with Eclipse Public License 1.0 | 5 votes |
@Test public void prunePathB() { int orgPathsCnt = swagger.getPaths().size(); int orgDefCnt = swagger.getDefinitions().size(); new PathPrunner() .prunePath("/b") .accept(swagger); assertEquals(orgPathsCnt - 4, swagger.getPaths().size()); assertEquals(orgDefCnt, swagger.getDefinitions().size()); Assert.assertThat(swagger.getPaths().keySet(), Every.everyItem(not(StringStartsWith.startsWith("/b")))); }
Example #2
Source File: PathPrunnerTest.java From yang2swagger with Eclipse Public License 1.0 | 5 votes |
@Test public void prunePathBA() { int orgPathsCnt = swagger.getPaths().size(); int orgDefCnt = swagger.getDefinitions().size(); new PathPrunner() .prunePath("/b/propE") .prunePath("/a") .accept(swagger); assertEquals(orgPathsCnt - 3, swagger.getPaths().size()); assertEquals(orgDefCnt, swagger.getDefinitions().size()); Assert.assertThat(swagger.getPaths().keySet(), Every.everyItem(not(StringStartsWith.startsWith("/b/propE")))); Assert.assertThat(swagger.getPaths().keySet(), Every.everyItem(not(StringStartsWith.startsWith("/a")))); Assert.assertThat(swagger.getPaths().keySet(), hasItem(StringStartsWith.startsWith("/b"))); }
Example #3
Source File: DatabaseConfigServiceTest.java From cloudbreak with Apache License 2.0 | 5 votes |
@Test public void testDeleteMultipleByCrn() { Set<DatabaseConfig> databaseConfigs = new HashSet<>(); databaseConfigs.add(getDatabaseConfig(ResourceStatus.USER_MANAGED, DATABASE_NAME)); databaseConfigs.add(getDatabaseConfig(ResourceStatus.USER_MANAGED, DATABASE_NAME2)); Set<Crn> databasesToDelete = Set.of(DB_CRN, DB2_CRN); when(repository.findByResourceCrnIn(databasesToDelete)).thenReturn(databaseConfigs); underTest.deleteMultipleByCrn(Set.of(DB_CRN_STRING, DB2_CRN_STRING)); assertThat(databaseConfigs, Every.everyItem(hasProperty("archived", is(true)))); }