@Override @SafeVarargs public final ObjectArrayAssert<ELEMENT> contains(ELEMENT... values) { return super.contains(values); }
@Override @SafeVarargs public final ObjectArrayAssert<ELEMENT> contains(ELEMENT... values) { return super.contains(values); }
public CursorLoaderAssert projectionContains(String... projection) { isNotNull(); assertThat(actual.getProjection()).contains(projection); return this; }
public CursorLoaderAssert projectionContains(String... projection) { isNotNull(); assertThat(actual.getProjection()).contains(projection); return this; }
public S hasColumns(String... names) { isNotNull(); assertThat(actual.getColumnNames()).contains(names); return myself; }
public CursorLoaderAssert containsSelectionArgs(String... selectionArgs) { isNotNull(); assertThat(actual.getSelectionArgs()).contains(selectionArgs); return this; }
public TaskStackBuilderAssert containsIntents(Intent... intents) { isNotNull(); assertThat(actual.getIntents()).contains(intents); return this; } }
public CursorLoaderAssert containsSelectionArgs(String... selectionArgs) { isNotNull(); assertThat(actual.getSelectionArgs()).contains(selectionArgs); return this; }
@Test public void fromCsvString() { assertThat(CsvUtil.fromCsvString("1,2")).hasSize(2).contains("1").contains("2"); assertThat(CsvUtil.fromCsvString("1,A BC")).hasSize(2).contains("1").contains("A BC"); assertThat(CsvUtil.fromCsvString("1,\"A,BC\"")).hasSize(2).contains("1").contains("A,BC"); assertThat(CsvUtil.fromCsvString("1,\"A,\"\"a\"\"BC\"")).hasSize(2).contains("1").contains("A,\"a\"BC"); // wrong format still work assertThat(CsvUtil.fromCsvString("1,\"A,\"a\"\"BC\"")).hasSize(2).contains("1").contains("A,\"a\"BC"); assertThat(CsvUtil.fromCsvString("1,ABC\"")).hasSize(2).contains("1").contains("ABC\""); }
public S hasColumn(String name) { isNotNull(); assertThat(actual.getColumnNames()) // .overridingErrorMessage("Expected to have column <%s> but did not.", name) // .contains(name); return myself; }
@Test public void testCreate() { final TestSpecModelFactory factory = new TestSpecModelFactory(); final TestSpecModel layoutSpecModel = factory.create(mElements, mTypes, mTypeElement, mMessager, RunMode.normal(), null, null); assertThat(layoutSpecModel.getSpecName()).isEqualTo("TestMyLayoutSpec"); assertThat(layoutSpecModel.getComponentName()).isEqualTo("TestMyLayout"); assertThat(layoutSpecModel.getSpecTypeName().toString()) .isEqualTo( "com.facebook.litho.specmodels.processor.testing.TestLayoutSpecModelFactoryTest.TestMyLayoutSpec"); assertThat(layoutSpecModel.getComponentTypeName().toString()) .isEqualTo( "com.facebook.litho.specmodels.processor.testing.TestLayoutSpecModelFactoryTest.TestMyLayout"); assertThat(layoutSpecModel.getProps().stream().map(PropModel::getName).toArray()) .hasSize(4) .contains("child", atIndex(0)) .contains("i", atIndex(1)) .contains("s", atIndex(2)) .contains("size", atIndex(3)); }
assertThat(strings).hasSize(2).contains("a", "b");
public void containsOneOfViolations(ViolationExpectation... expectedViolations) { isNotNull(); List<ViolationExpectation> actualViolations = getActualViolationExpectations( expectedViolations ); Assertions.assertThat( actualViolations ).hasSize( 1 ); Assertions.assertThat( expectedViolations ).contains( actualViolations.get( 0 ) ); }
@Test public void shouldReturnDefaultDocumentTypes() throws Exception { String[] knownDocumentTypes = DocumentTypes.getDocumentTypes(); String[] expectedDocumentType = new String[] {"page", "post", "masterindex", "archive", "feed" }; assertThat(knownDocumentTypes).contains(expectedDocumentType); }
@Test public void shouldAddNewDocumentType() { String newDocumentType = "newDocumentType"; DocumentTypes.addDocumentType(newDocumentType); assertThat(DocumentTypes.getDocumentTypes()).contains(newDocumentType); }
public S hasColumns(String... names) { isNotNull(); assertThat(actual.getColumnNames()).contains(names); return myself; }
public S hasColumn(String name) { isNotNull(); assertThat(actual.getColumnNames()) // .overridingErrorMessage("Expected to have column <%s> but did not.", name) // .contains(name); return myself; }
@Test public void should_be_able_get_namespace_using_kubectl() { // when final List<String> output = commandExecutor.execCommand("kubectl get ns -o jsonpath='{..name}'"); final String firstLine = output.get(0); final String[] namespaces = firstLine.substring(1, firstLine.length() - 1).split(" "); // then assertThat(namespaces).contains("default"); }
@Test public void should_register_analyze_group_when_analyze_menu_exists() { when(actionManager.getAction("AnalyzeMenu")).thenReturn(analyzeMenuGroup); instance.initComponent(); assertThat(analyzeMenuGroup.getChildActionsOrStubs()).contains(sonarlintAnalyzeMenuGroup); }