Skip to content

Commit

Permalink
Add missing ObjectArrayAssert_anySatisfy_Test
Browse files Browse the repository at this point in the history
  • Loading branch information
epeee committed Aug 17, 2020
1 parent 1c7f106 commit cbf4577
Showing 1 changed file with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Copyright 2012-2020 the original author or authors.
*/
package org.assertj.core.api.objectarray;

import org.assertj.core.api.ObjectArrayAssert;
import org.assertj.core.api.ObjectArrayAssertBaseTest;
import org.junit.jupiter.api.BeforeEach;

import java.util.function.Consumer;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.util.Lists.newArrayList;
import static org.mockito.Mockito.verify;

class ObjectArrayAssert_anySatisfy_Test extends ObjectArrayAssertBaseTest {

private Consumer<Object> restrictions;

@BeforeEach
void beforeOnce() {
restrictions = o -> assertThat(o).isNotNull();;
}

@Override
protected ObjectArrayAssert<Object> invoke_api_method() {
return assertions.anySatisfy(restrictions);
}

@Override
protected void verify_internal_effects() {
verify(iterables).assertAnySatisfy(getInfo(assertions), newArrayList(getActual(assertions)), restrictions);
}
}

0 comments on commit cbf4577

Please sign in to comment.