Search in sources :

Example 81 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project flow by vaadin.

the class BootstrapHandlerTest method useDependencyFilters_removeDependenciesAndAddNewOnes.

@Test
public void useDependencyFilters_removeDependenciesAndAddNewOnes() throws ServiceException {
    List<DependencyFilter> filters = Arrays.asList((list, context) -> {
        // remove everything
        list.clear();
        return list;
    }, (list, context) -> {
        list.add(new Dependency(Dependency.Type.JAVASCRIPT, "imported-by-filter.js", LoadMode.EAGER));
        list.add(new Dependency(Dependency.Type.JAVASCRIPT, "imported-by-filter2.js", LoadMode.EAGER));
        return list;
    }, (list, context) -> {
        // removes the imported-by-filter2.js
        list.remove(1);
        return list;
    }, (list, context) -> {
        list.add(new Dependency(Dependency.Type.STYLESHEET, "imported-by-filter.css", LoadMode.EAGER));
        return list;
    });
    service.setDependencyFilters(filters);
    initUI(testUI);
    BootstrapContext bootstrapContext = new BootstrapContext(request, null, session, testUI, this::contextRootRelativePath);
    Document page = pageBuilder.getBootstrapPage(bootstrapContext);
    Elements scripts = page.head().getElementsByTag("script");
    boolean found = scripts.stream().anyMatch(element -> element.attr("src").equals("imported-by-filter.js"));
    Assert.assertTrue("imported-by-filter.js should be in the head of the page", found);
    found = scripts.stream().anyMatch(element -> element.attr("src").equals("imported-by-filter2.js"));
    Assert.assertFalse("imported-by-filter2.js shouldn't be in the head of the page", found);
    found = scripts.stream().anyMatch(element -> element.attr("src").equals("./eager.js"));
    Assert.assertFalse("eager.js shouldn't be in the head of the page", found);
    Elements links = page.head().getElementsByTag("link");
    found = links.stream().anyMatch(element -> element.attr("href").equals("imported-by-filter.css"));
    Assert.assertTrue("imported-by-filter.css should be in the head of the page", found);
}
Also used : CoreMatchers(org.hamcrest.CoreMatchers) Arrays(java.util.Arrays) Component(com.vaadin.flow.component.Component) JavaScript(com.vaadin.flow.component.dependency.JavaScript) Inline(com.vaadin.flow.component.page.Inline) BootstrapContext(com.vaadin.flow.server.BootstrapHandler.BootstrapContext) URL(java.net.URL) TargetElement(com.vaadin.flow.component.page.TargetElement) Registration(com.vaadin.flow.shared.Registration) INDEX_HTML(com.vaadin.flow.server.frontend.FrontendUtils.INDEX_HTML) PageTitle(com.vaadin.flow.router.PageTitle) Router(com.vaadin.flow.router.Router) Route(com.vaadin.flow.router.Route) RouteAlias(com.vaadin.flow.router.RouteAlias) VAADIN_WEBAPP_RESOURCES(com.vaadin.flow.server.Constants.VAADIN_WEBAPP_RESOURCES) PushMode(com.vaadin.flow.shared.communication.PushMode) ByteArrayInputStream(java.io.ByteArrayInputStream) Locale(java.util.Locale) Element(org.jsoup.nodes.Element) After(org.junit.After) Lookup(com.vaadin.flow.di.Lookup) UI(com.vaadin.flow.component.UI) VAADIN_MAPPING(com.vaadin.flow.server.Constants.VAADIN_MAPPING) Set(java.util.Set) StandardCharsets(java.nio.charset.StandardCharsets) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) ApplicationConfiguration(com.vaadin.flow.server.startup.ApplicationConfiguration) MatcherAssert(org.hamcrest.MatcherAssert) Assert.assertFalse(org.junit.Assert.assertFalse) Document(org.jsoup.nodes.Document) LoadMode(com.vaadin.flow.shared.ui.LoadMode) BodySize(com.vaadin.flow.component.page.BodySize) Optional(java.util.Optional) Elements(org.jsoup.select.Elements) ApplicationConstants(com.vaadin.flow.shared.ApplicationConstants) MockDeploymentConfiguration(com.vaadin.tests.util.MockDeploymentConfiguration) TestRouteRegistry(com.vaadin.flow.router.TestRouteRegistry) VaadinUriResolver(com.vaadin.flow.shared.VaadinUriResolver) Dependency(com.vaadin.flow.shared.ui.Dependency) AtomicReference(java.util.concurrent.atomic.AtomicReference) LinkedHashMap(java.util.LinkedHashMap) HttpServletRequest(javax.servlet.http.HttpServletRequest) Tag(com.vaadin.flow.component.Tag) Location(com.vaadin.flow.router.Location) Before(org.junit.Before) QueryParameters(com.vaadin.flow.router.QueryParameters) Text(com.vaadin.flow.component.Text) RouterLayout(com.vaadin.flow.router.RouterLayout) Html(com.vaadin.flow.component.Html) StyleSheet(com.vaadin.flow.component.dependency.StyleSheet) Meta(com.vaadin.flow.component.page.Meta) TestVaadinServletService(com.vaadin.flow.server.MockServletServiceSessionSetup.TestVaadinServletService) FileOutputStream(java.io.FileOutputStream) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) ResourceProvider(com.vaadin.flow.di.ResourceProvider) Mockito.when(org.mockito.Mockito.when) File(java.io.File) Mockito(org.mockito.Mockito) Rule(org.junit.Rule) RouteConfiguration(com.vaadin.flow.router.RouteConfiguration) FeatureFlags(com.vaadin.experimental.FeatureFlags) Assert(org.junit.Assert) Collections(java.util.Collections) Viewport(com.vaadin.flow.component.page.Viewport) TemporaryFolder(org.junit.rules.TemporaryFolder) ParentLayout(com.vaadin.flow.router.ParentLayout) Assert.assertEquals(org.junit.Assert.assertEquals) InputStream(java.io.InputStream) BootstrapContext(com.vaadin.flow.server.BootstrapHandler.BootstrapContext) Dependency(com.vaadin.flow.shared.ui.Dependency) Document(org.jsoup.nodes.Document) Elements(org.jsoup.select.Elements) Test(org.junit.Test)

Example 82 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project flow by vaadin.

the class NodeUpdateImportsTest method noFallBackScanner_fallbackIsNotImportedEvenIfTheFileExists.

@Test
public void noFallBackScanner_fallbackIsNotImportedEvenIfTheFileExists() throws Exception {
    Stream<Class<?>> classes = Stream.concat(Stream.of(NodeTestComponents.class.getDeclaredClasses()), Stream.of(ExtraNodeTestComponents.class.getDeclaredClasses()));
    ClassFinder classFinder = new DefaultClassFinder(new URLClassLoader(getClassPath()), classes.toArray(Class<?>[]::new));
    // create fallback imports file:
    // it is present after generated but the user is now running
    // everything without fallback. The file should not be included into
    // the imports
    fallBackImportsFile.mkdirs();
    fallBackImportsFile.createNewFile();
    Assert.assertTrue(fallBackImportsFile.exists());
    updater = new TaskUpdateImports(classFinder, new FrontendDependenciesScannerFactory().createScanner(false, classFinder, true), finder -> null, tmpRoot, generatedPath, frontendDirectory, tokenFile, null, false, TARGET, true, false, Mockito.mock(FeatureFlags.class)) {

        @Override
        Logger log() {
            return logger;
        }
    };
    updater.execute();
    assertTrue(importsFile.exists());
    String mainContent = FileUtils.readFileToString(importsFile, Charset.defaultCharset());
    // fallback file is not imported in generated-flow-imports
    MatcherAssert.assertThat(mainContent, CoreMatchers.not(CoreMatchers.containsString(FrontendUtils.FALLBACK_IMPORTS_NAME)));
}
Also used : CoreMatchers(org.hamcrest.CoreMatchers) DEFAULT_FRONTEND_DIR(com.vaadin.flow.server.frontend.FrontendUtils.DEFAULT_FRONTEND_DIR) Json(elemental.json.Json) JsonArray(elemental.json.JsonArray) DEFAULT_GENERATED_DIR(com.vaadin.flow.server.frontend.FrontendUtils.DEFAULT_GENERATED_DIR) IMPORTS_D_TS_NAME(com.vaadin.flow.server.frontend.FrontendUtils.IMPORTS_D_TS_NAME) HashSet(java.util.HashSet) URLClassLoader(java.net.URLClassLoader) Charset(java.nio.charset.Charset) FrontendDependenciesScannerFactory(com.vaadin.flow.server.frontend.scanner.FrontendDependenciesScanner.FrontendDependenciesScannerFactory) ExpectedException(org.junit.rules.ExpectedException) Before(org.junit.Before) DefaultClassFinder(com.vaadin.flow.server.frontend.scanner.ClassFinder.DefaultClassFinder) Logger(org.slf4j.Logger) ClassFinder(com.vaadin.flow.server.frontend.scanner.ClassFinder) NODE_MODULES(com.vaadin.flow.server.frontend.FrontendUtils.NODE_MODULES) Set(java.util.Set) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) FileUtils(org.apache.commons.io.FileUtils) Test(org.junit.Test) TARGET(com.vaadin.flow.server.Constants.TARGET) File(java.io.File) StandardCharsets(java.nio.charset.StandardCharsets) IMPORTS_NAME(com.vaadin.flow.server.frontend.FrontendUtils.IMPORTS_NAME) Mockito(org.mockito.Mockito) Stream(java.util.stream.Stream) MatcherAssert(org.hamcrest.MatcherAssert) Rule(org.junit.Rule) Paths(java.nio.file.Paths) FeatureFlags(com.vaadin.experimental.FeatureFlags) JsonObject(elemental.json.JsonObject) FLOW_NPM_PACKAGE_NAME(com.vaadin.flow.server.frontend.FrontendUtils.FLOW_NPM_PACKAGE_NAME) Assert(org.junit.Assert) TemporaryFolder(org.junit.rules.TemporaryFolder) DefaultClassFinder(com.vaadin.flow.server.frontend.scanner.ClassFinder.DefaultClassFinder) FrontendDependenciesScannerFactory(com.vaadin.flow.server.frontend.scanner.FrontendDependenciesScanner.FrontendDependenciesScannerFactory) URLClassLoader(java.net.URLClassLoader) DefaultClassFinder(com.vaadin.flow.server.frontend.scanner.ClassFinder.DefaultClassFinder) ClassFinder(com.vaadin.flow.server.frontend.scanner.ClassFinder) Logger(org.slf4j.Logger) Test(org.junit.Test)

Example 83 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project flow by vaadin.

the class BinderTest method invalidUsage_modifyFieldsInsideValidator_binderDoesNotThrow.

@Test
public void invalidUsage_modifyFieldsInsideValidator_binderDoesNotThrow() {
    TestTextField field = new TestTextField();
    AtomicBoolean validatorIsExecuted = new AtomicBoolean();
    binder.forField(field).asRequired().withValidator((val, context) -> {
        nameField.setValue("foo");
        ageField.setValue("bar");
        validatorIsExecuted.set(true);
        return ValidationResult.ok();
    }).bind(Person::getEmail, Person::setEmail);
    binder.forField(nameField).bind(Person::getFirstName, Person::setFirstName);
    binder.forField(ageField).bind(Person::getLastName, Person::setLastName);
    binder.setBean(new Person());
    field.setValue("baz");
    // mostly self control, the main check is: not exception is thrown
    Assert.assertTrue(validatorIsExecuted.get());
}
Also used : CoreMatchers(org.hamcrest.CoreMatchers) HasValue(com.vaadin.flow.component.HasValue) CurrentInstance(com.vaadin.flow.internal.CurrentInstance) Person(com.vaadin.flow.tests.data.bean.Person) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) StringToDoubleConverter(com.vaadin.flow.data.converter.StringToDoubleConverter) AtomicReference(java.util.concurrent.atomic.AtomicReference) StringUtils(org.apache.commons.lang3.StringUtils) NumberFormat(java.text.NumberFormat) Assert.assertSame(org.junit.Assert.assertSame) BigDecimal(java.math.BigDecimal) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Locale(java.util.Locale) IntegerRangeValidator(com.vaadin.flow.data.validator.IntegerRangeValidator) Map(java.util.Map) After(org.junit.After) BindingBuilder(com.vaadin.flow.data.binder.Binder.BindingBuilder) UI(com.vaadin.flow.component.UI) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) ExpectedException(org.junit.rules.ExpectedException) Before(org.junit.Before) StringToIntegerConverter(com.vaadin.flow.data.converter.StringToIntegerConverter) Assert.assertNotNull(org.junit.Assert.assertNotNull) DecimalFormat(java.text.DecimalFormat) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Matchers.isEmptyString(org.hamcrest.Matchers.isEmptyString) StringToBigDecimalConverter(com.vaadin.flow.data.converter.StringToBigDecimalConverter) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) Serializable(java.io.Serializable) Objects(java.util.Objects) Converter(com.vaadin.flow.data.converter.Converter) StringLengthValidator(com.vaadin.flow.data.validator.StringLengthValidator) Stream(java.util.stream.Stream) Rule(org.junit.Rule) Assert.assertNull(org.junit.Assert.assertNull) Assert.assertFalse(org.junit.Assert.assertFalse) Optional(java.util.Optional) NotEmptyValidator(com.vaadin.flow.data.validator.NotEmptyValidator) Assert(org.junit.Assert) Binding(com.vaadin.flow.data.binder.Binder.Binding) TestTextField(com.vaadin.flow.data.binder.testcomponents.TestTextField) Sex(com.vaadin.flow.tests.data.bean.Sex) Matchers.containsString(org.hamcrest.Matchers.containsString) Assert.assertEquals(org.junit.Assert.assertEquals) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TestTextField(com.vaadin.flow.data.binder.testcomponents.TestTextField) Person(com.vaadin.flow.tests.data.bean.Person) Test(org.junit.Test)

Example 84 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project flink by apache.

the class KinesisProxyTest method testGetShardListWithNewShardsOnSecondRun.

@Test
public void testGetShardListWithNewShardsOnSecondRun() throws Exception {
    // given
    List<String> shardIds = Arrays.asList(KinesisShardIdGenerator.generateFromShardOrder(0), KinesisShardIdGenerator.generateFromShardOrder(1));
    String fakeStreamName = "fake-stream";
    List<Shard> shards = shardIds.stream().map(shardId -> new Shard().withShardId(shardId)).collect(Collectors.toList());
    AmazonKinesis mockClient = mock(AmazonKinesis.class);
    KinesisProxy kinesisProxy = getProxy(mockClient);
    ListShardsResult responseFirst = new ListShardsResult().withShards(shards).withNextToken(null);
    doReturn(responseFirst).when(mockClient).listShards(argThat(initialListShardsRequestMatcher()));
    HashMap<String, String> streamHashMap = createInitialSubscribedStreamsToLastDiscoveredShardsState(Collections.singletonList(fakeStreamName));
    // when
    GetShardListResult shardListResult = kinesisProxy.getShardList(streamHashMap);
    // then
    Assert.assertTrue(shardListResult.hasRetrievedShards());
    Set<String> expectedStreams = new HashSet<>();
    expectedStreams.add(fakeStreamName);
    Assert.assertEquals(shardListResult.getStreamsWithRetrievedShards(), expectedStreams);
    List<StreamShardHandle> actualShardList = shardListResult.getRetrievedShardListOfStream(fakeStreamName);
    Assert.assertThat(actualShardList, hasSize(2));
    List<StreamShardHandle> expectedStreamShard = IntStream.range(0, actualShardList.size()).mapToObj(i -> new StreamShardHandle(fakeStreamName, new Shard().withShardId(KinesisShardIdGenerator.generateFromShardOrder(i)))).collect(Collectors.toList());
    Assert.assertThat(actualShardList, containsInAnyOrder(expectedStreamShard.toArray(new StreamShardHandle[actualShardList.size()])));
    // given new shards
    ListShardsResult responseSecond = new ListShardsResult().withShards(new Shard().withShardId(KinesisShardIdGenerator.generateFromShardOrder(2))).withNextToken(null);
    doReturn(responseSecond).when(mockClient).listShards(argThat(initialListShardsRequestMatcher()));
    // when new shards
    GetShardListResult newShardListResult = kinesisProxy.getShardList(streamHashMap);
    // then new shards
    Assert.assertTrue(newShardListResult.hasRetrievedShards());
    Assert.assertEquals(newShardListResult.getStreamsWithRetrievedShards(), expectedStreams);
    List<StreamShardHandle> newActualShardList = newShardListResult.getRetrievedShardListOfStream(fakeStreamName);
    Assert.assertThat(newActualShardList, hasSize(1));
    List<StreamShardHandle> newExpectedStreamShard = Collections.singletonList(new StreamShardHandle(fakeStreamName, new Shard().withShardId(KinesisShardIdGenerator.generateFromShardOrder(2))));
    Assert.assertThat(newActualShardList, containsInAnyOrder(newExpectedStreamShard.toArray(new StreamShardHandle[newActualShardList.size()])));
}
Also used : Shard(com.amazonaws.services.kinesis.model.Shard) Arrays(java.util.Arrays) MutableInt(org.apache.commons.lang3.mutable.MutableInt) ConsumerConfigConstants(org.apache.flink.streaming.connectors.kinesis.config.ConsumerConfigConstants) IsIterableContainingInAnyOrder.containsInAnyOrder(org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder) ClientConfigurationFactory(com.amazonaws.ClientConfigurationFactory) InetAddress(java.net.InetAddress) MockitoHamcrest.argThat(org.mockito.hamcrest.MockitoHamcrest.argThat) KinesisShardIdGenerator(org.apache.flink.streaming.connectors.kinesis.testutils.KinesisShardIdGenerator) Mockito.doReturn(org.mockito.Mockito.doReturn) ListShardsResult(com.amazonaws.services.kinesis.model.ListShardsResult) GetRecordsResult(com.amazonaws.services.kinesis.model.GetRecordsResult) AmazonServiceException(com.amazonaws.AmazonServiceException) AmazonKinesis(com.amazonaws.services.kinesis.AmazonKinesis) StreamShardHandle(org.apache.flink.streaming.connectors.kinesis.model.StreamShardHandle) Set(java.util.Set) Collectors(java.util.stream.Collectors) IsCollectionWithSize.hasSize(org.hamcrest.collection.IsCollectionWithSize.hasSize) Matchers.any(org.mockito.Matchers.any) AWSConfigConstants(org.apache.flink.streaming.connectors.kinesis.config.AWSConfigConstants) List(java.util.List) Assert.assertFalse(org.junit.Assert.assertFalse) Mockito.mock(org.mockito.Mockito.mock) IntStream(java.util.stream.IntStream) Whitebox(org.powermock.reflect.Whitebox) ListShardsRequest(com.amazonaws.services.kinesis.model.ListShardsRequest) ProvisionedThroughputExceededException(com.amazonaws.services.kinesis.model.ProvisionedThroughputExceededException) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) TypeSafeDiagnosingMatcher(org.hamcrest.TypeSafeDiagnosingMatcher) HashSet(java.util.HashSet) Answer(org.mockito.stubbing.Answer) InvocationOnMock(org.mockito.invocation.InvocationOnMock) ConnectTimeoutException(org.apache.http.conn.ConnectTimeoutException) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Description(org.hamcrest.Description) Properties(java.util.Properties) Assert.assertTrue(org.junit.Assert.assertTrue) ErrorType(com.amazonaws.AmazonServiceException.ErrorType) Test(org.junit.Test) UnknownHostException(java.net.UnknownHostException) Mockito(org.mockito.Mockito) SdkClientException(com.amazonaws.SdkClientException) ClientConfiguration(com.amazonaws.ClientConfiguration) AmazonKinesisClient(com.amazonaws.services.kinesis.AmazonKinesisClient) AWSUtil(org.apache.flink.streaming.connectors.kinesis.util.AWSUtil) AmazonKinesisException(com.amazonaws.services.kinesis.model.AmazonKinesisException) Assert(org.junit.Assert) ExpiredIteratorException(com.amazonaws.services.kinesis.model.ExpiredIteratorException) HttpHost(org.apache.http.HttpHost) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) ListShardsResult(com.amazonaws.services.kinesis.model.ListShardsResult) StreamShardHandle(org.apache.flink.streaming.connectors.kinesis.model.StreamShardHandle) Shard(com.amazonaws.services.kinesis.model.Shard) AmazonKinesis(com.amazonaws.services.kinesis.AmazonKinesis) HashSet(java.util.HashSet) Test(org.junit.Test)

Example 85 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project flink by apache.

the class JobGraphGeneratorTest method testGeneratingJobGraphWithUnconsumedResultPartition.

@Test
public void testGeneratingJobGraphWithUnconsumedResultPartition() {
    ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
    DataSet<Tuple2<Long, Long>> input = env.fromElements(new Tuple2<>(1L, 2L)).setParallelism(1);
    DataSet<Tuple2<Long, Long>> ds = input.map(new IdentityMapper<>()).setParallelism(3);
    AbstractID intermediateDataSetID = new AbstractID();
    // this output branch will be excluded.
    ds.output(BlockingShuffleOutputFormat.createOutputFormat(intermediateDataSetID)).setParallelism(1);
    // this is the normal output branch.
    ds.output(new DiscardingOutputFormat<>()).setParallelism(1);
    JobGraph jobGraph = compileJob(env);
    Assert.assertEquals(3, jobGraph.getVerticesSortedTopologicallyFromSources().size());
    JobVertex mapVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(1);
    Assert.assertThat(mapVertex, Matchers.instanceOf(JobVertex.class));
    // there are 2 output result with one of them is ResultPartitionType.BLOCKING_PERSISTENT
    Assert.assertEquals(2, mapVertex.getProducedDataSets().size());
    Assert.assertTrue(mapVertex.getProducedDataSets().stream().anyMatch(dataSet -> dataSet.getId().equals(new IntermediateDataSetID(intermediateDataSetID)) && dataSet.getResultType() == ResultPartitionType.BLOCKING_PERSISTENT));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) LongSumAggregator(org.apache.flink.api.common.aggregators.LongSumAggregator) JobVertex(org.apache.flink.runtime.jobgraph.JobVertex) Tuple2(org.apache.flink.api.java.tuple.Tuple2) JobGraph(org.apache.flink.runtime.jobgraph.JobGraph) ResultPartitionType(org.apache.flink.runtime.io.network.partition.ResultPartitionType) HashMap(java.util.HashMap) JobType(org.apache.flink.runtime.jobgraph.JobType) MapFunction(org.apache.flink.api.common.functions.MapFunction) DataSink(org.apache.flink.api.java.operators.DataSink) Assert.assertThat(org.junit.Assert.assertThat) DataSet(org.apache.flink.api.java.DataSet) JobGraphUtils(org.apache.flink.runtime.jobgraph.JobGraphUtils) DeltaIteration(org.apache.flink.api.java.operators.DeltaIteration) ResourceSpec(org.apache.flink.api.common.operators.ResourceSpec) Map(java.util.Map) Plan(org.apache.flink.api.common.Plan) Optimizer(org.apache.flink.optimizer.Optimizer) BlockingShuffleOutputFormat(org.apache.flink.api.java.io.BlockingShuffleOutputFormat) IdentityMapper(org.apache.flink.optimizer.testfunctions.IdentityMapper) Method(java.lang.reflect.Method) Path(java.nio.file.Path) OptimizedPlan(org.apache.flink.optimizer.plan.OptimizedPlan) DiscardingOutputFormat(org.apache.flink.api.java.io.DiscardingOutputFormat) Files(java.nio.file.Files) AbstractID(org.apache.flink.util.AbstractID) Assert.assertNotNull(org.junit.Assert.assertNotNull) IterativeDataSet(org.apache.flink.api.java.operators.IterativeDataSet) Configuration(org.apache.flink.configuration.Configuration) Matchers(org.hamcrest.Matchers) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) IOException(java.io.IOException) IntermediateDataSetID(org.apache.flink.runtime.jobgraph.IntermediateDataSetID) DistributedCache(org.apache.flink.api.common.cache.DistributedCache) Operator(org.apache.flink.api.java.operators.Operator) FilterFunction(org.apache.flink.api.common.functions.FilterFunction) JobID(org.apache.flink.api.common.JobID) Rule(org.junit.Rule) ExecutionEnvironment(org.apache.flink.api.java.ExecutionEnvironment) Assert.assertFalse(org.junit.Assert.assertFalse) Assert(org.junit.Assert) TemporaryFolder(org.junit.rules.TemporaryFolder) Assert.assertEquals(org.junit.Assert.assertEquals) ExecutionEnvironment(org.apache.flink.api.java.ExecutionEnvironment) JobGraph(org.apache.flink.runtime.jobgraph.JobGraph) JobVertex(org.apache.flink.runtime.jobgraph.JobVertex) IdentityMapper(org.apache.flink.optimizer.testfunctions.IdentityMapper) Tuple2(org.apache.flink.api.java.tuple.Tuple2) IntermediateDataSetID(org.apache.flink.runtime.jobgraph.IntermediateDataSetID) AbstractID(org.apache.flink.util.AbstractID) DiscardingOutputFormat(org.apache.flink.api.java.io.DiscardingOutputFormat) Test(org.junit.Test)

Aggregations

Assert (org.junit.Assert)88 Assert.assertTrue (org.junit.Assert.assertTrue)88 Test (org.junit.Test)88 Assert.assertEquals (org.junit.Assert.assertEquals)84 List (java.util.List)82 Before (org.junit.Before)67 UUID (java.util.UUID)55 Assert.assertFalse (org.junit.Assert.assertFalse)54 Autowired (org.springframework.beans.factory.annotation.Autowired)53 Assert.assertNotNull (org.junit.Assert.assertNotNull)52 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)51 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)51 IdmIdentityContractDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)49 GuardedString (eu.bcvsolutions.idm.core.security.api.domain.GuardedString)48 Transactional (org.springframework.transaction.annotation.Transactional)46 After (org.junit.After)44 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)42 ApplicationContext (org.springframework.context.ApplicationContext)38 IdmIdentityRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto)37 ResultCodeException (eu.bcvsolutions.idm.core.api.exception.ResultCodeException)36