Search in sources :

Example 46 with Assert.assertTrue

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

the class BootstrapHandlerTest method empty_body_size_adds_margin_but_no_size_for_body.

// 3749
@Test
public void empty_body_size_adds_margin_but_no_size_for_body() throws InvalidRouteConfigurationException {
    initUI(testUI, createVaadinRequest(), Collections.singleton(EmptyBodySizeAnnotated.class));
    Document page = pageBuilder.getBootstrapPage(new BootstrapContext(request, null, session, testUI, this::contextRootRelativePath));
    Elements allElements = page.head().getAllElements();
    Optional<Element> styleTag = allElements.stream().filter(element -> element.tagName().equals("style")).findFirst();
    Assert.assertTrue("Expected a style element in head.", styleTag.isPresent());
    Assert.assertTrue("The first style tag should start with body style containing only margin", styleTag.get().toString().startsWith("<style type=\"text/css\">body {margin:0;}"));
}
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) TargetElement(com.vaadin.flow.component.page.TargetElement) Element(org.jsoup.nodes.Element) BootstrapContext(com.vaadin.flow.server.BootstrapHandler.BootstrapContext) Document(org.jsoup.nodes.Document) Elements(org.jsoup.select.Elements) Test(org.junit.Test)

Example 47 with Assert.assertTrue

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

the class BootstrapHandlerTest method body_size_adds_styles_for_body.

// 2344
@Test
public void body_size_adds_styles_for_body() throws InvalidRouteConfigurationException {
    initUI(testUI, createVaadinRequest(), Collections.singleton(BodySizeAnnotated.class));
    Document page = pageBuilder.getBootstrapPage(new BootstrapContext(request, null, session, testUI, this::contextRootRelativePath));
    Elements allElements = page.head().getAllElements();
    Optional<Element> styleTag = allElements.stream().filter(element -> element.tagName().equals("style")).findFirst();
    Assert.assertTrue("Expected a style element in head.", styleTag.isPresent());
    Assert.assertTrue("The first style tag should start with body style from @BodySize", styleTag.get().toString().startsWith("<style type=\"text/css\">body {height:10px;width:20px;margin:0;}"));
}
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) TargetElement(com.vaadin.flow.component.page.TargetElement) Element(org.jsoup.nodes.Element) BootstrapContext(com.vaadin.flow.server.BootstrapHandler.BootstrapContext) Document(org.jsoup.nodes.Document) Elements(org.jsoup.select.Elements) Test(org.junit.Test)

Example 48 with Assert.assertTrue

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

the class BootstrapHandlerTest method index_appended_to_head_in_npm.

@Test
public void index_appended_to_head_in_npm() throws InvalidRouteConfigurationException {
    initUI(testUI, createVaadinRequest(), Collections.singleton(AliasLayout.class));
    Document page = pageBuilder.getBootstrapPage(new BootstrapContext(request, null, session, testUI, this::contextRootRelativePath));
    Elements allElements = page.head().getAllElements();
    Assert.assertTrue("index.js should be added to head for ES6 browsers. (type module with crossorigin)", allElements.stream().map(Object::toString).anyMatch(element -> element.equals("<script type=\"module\" src=\"./" + VAADIN_MAPPING + "build/vaadin-bundle-1111.cache.js\" data-app-id=\"" + testUI.getInternals().getAppId() + "\" crossorigin></script>")));
}
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) Document(org.jsoup.nodes.Document) Elements(org.jsoup.select.Elements) Test(org.junit.Test)

Example 49 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project OpenGrok by OpenGrok.

the class ProjectMessageTest method testDelete.

/**
 * This test needs to perform indexing so that it can be verified that
 * the delete message handling performs removal of the index data.
 * @throws Exception
 */
@Test
public void testDelete() throws Exception {
    String[] projectsToDelete = { "git", "svn" };
    assertTrue("No point in running indexer tests without valid ctags", RuntimeEnvironment.getInstance().validateExuberantCtags());
    // Add a group matching the project to be added.
    String groupName = "gitgroup";
    Group group = new Group(groupName, "git.*");
    env.getGroups().add(group);
    Assert.assertTrue(env.hasGroups());
    Assert.assertEquals(1, env.getGroups().stream().filter(g -> g.getName().equals(groupName)).collect(Collectors.toSet()).size());
    Assert.assertEquals(0, group.getRepositories().size());
    Assert.assertEquals(0, group.getProjects().size());
    // Firstly add some projects.
    Message m = new ProjectMessage();
    m.setText("add");
    m.addTag("mercurial");
    m.addTag("git");
    m.addTag("svn");
    Assert.assertEquals(0, env.getProjects().size());
    Assert.assertEquals(0, env.getRepositories().size());
    Assert.assertEquals(0, env.getProjectRepositoriesMap().size());
    m.apply(env);
    Assert.assertEquals(3, env.getProjects().size());
    Assert.assertEquals(3, env.getRepositories().size());
    Assert.assertEquals(3, env.getProjectRepositoriesMap().size());
    // Check the group was populated properly.
    Assert.assertEquals(1, group.getRepositories().size());
    Assert.assertEquals(0, group.getProjects().size());
    Assert.assertEquals(1, group.getRepositories().stream().filter(p -> p.getName().equals("git")).collect(Collectors.toSet()).size());
    // Run the indexer (ala 'indexpart') so that data directory is populated.
    ArrayList<String> subFiles = new ArrayList<>();
    subFiles.add("/git");
    subFiles.add("/mercurial");
    subFiles.add("/svn");
    ArrayList<String> repos = new ArrayList<>();
    repos.add("/git");
    repos.add("/mercurial");
    repos.add("/svn");
    // This is necessary so that repositories in HistoryGuru get populated.
    // When 'indexpart' is run, this is called from setConfiguration() because
    // of the -R option is present.
    HistoryGuru.getInstance().invalidateRepositories(env.getRepositories());
    env.setHistoryEnabled(true);
    Indexer.getInstance().prepareIndexer(env, // don't search for repositories
    false, // don't scan and add projects
    false, // no default project
    null, // don't list files
    false, // don't create dictionary
    false, // subFiles - needed when refreshing history partially
    subFiles, // repositories - needed when refreshing history partially
    repos, // don't zap cache
    new ArrayList<>(), // don't list repos
    false);
    Indexer.getInstance().doIndexerExecution(true, null, null);
    // Then remove multiple projects.
    m.setText("delete");
    m.setTags(new TreeSet<String>());
    for (String p : projectsToDelete) {
        m.addTag(p);
    }
    m.apply(env);
    Assert.assertEquals(1, env.getProjects().size());
    Assert.assertEquals(1, env.getRepositories().size());
    Assert.assertEquals(1, env.getProjectRepositoriesMap().size());
    // Test data removal.
    File dataRoot = env.getDataRootFile();
    for (String projectName : projectsToDelete) {
        for (String dirName : new String[] { "historycache", IndexDatabase.XREF_DIR, IndexDatabase.INDEX_DIR }) {
            File dir = new File(env.getDataRootFile(), dirName + File.separator + projectName);
            Assert.assertFalse(dir.exists());
        }
    }
    // Check that HistoryGuru no longer maintains the removed projects.
    for (String p : projectsToDelete) {
        Assert.assertFalse(HistoryGuru.getInstance().getRepositories().stream().map(ri -> ri.getDirectoryName()).collect(Collectors.toSet()).contains(repository.getSourceRoot() + File.separator + p));
    }
    // Check the group no longer contains the removed project.
    Assert.assertEquals(0, group.getRepositories().size());
    Assert.assertEquals(0, group.getProjects().size());
}
Also used : IOUtils.removeRecursive(org.opensolaris.opengrok.util.IOUtils.removeRecursive) HistoryGuru(org.opensolaris.opengrok.history.HistoryGuru) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) Indexer(org.opensolaris.opengrok.index.Indexer) RepositoryInstalled(org.opensolaris.opengrok.condition.RepositoryInstalled) GitRepository(org.opensolaris.opengrok.history.GitRepository) Project(org.opensolaris.opengrok.configuration.Project) RuntimeEnvironment(org.opensolaris.opengrok.configuration.RuntimeEnvironment) After(org.junit.After) Assume(org.junit.Assume) ConditionalRun(org.opensolaris.opengrok.condition.ConditionalRun) Group(org.opensolaris.opengrok.configuration.Group) Before(org.junit.Before) MercurialRepository(org.opensolaris.opengrok.history.MercurialRepository) SubversionRepository(org.opensolaris.opengrok.history.SubversionRepository) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) Collectors(java.util.stream.Collectors) File(java.io.File) TestRepository(org.opensolaris.opengrok.util.TestRepository) List(java.util.List) IndexDatabase(org.opensolaris.opengrok.index.IndexDatabase) RepositoryFactory(org.opensolaris.opengrok.history.RepositoryFactory) MercurialRepositoryTest(org.opensolaris.opengrok.history.MercurialRepositoryTest) Assert(org.junit.Assert) RepositoryInfo(org.opensolaris.opengrok.history.RepositoryInfo) Group(org.opensolaris.opengrok.configuration.Group) ArrayList(java.util.ArrayList) File(java.io.File) Test(org.junit.Test) MercurialRepositoryTest(org.opensolaris.opengrok.history.MercurialRepositoryTest)

Example 50 with Assert.assertTrue

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

the class BootstrapHandlerTest method theme_contents_added_also_when_theme_in_super_class.

// 3384
@Test
public void theme_contents_added_also_when_theme_in_super_class() throws InvalidRouteConfigurationException {
    initUI(testUI, createVaadinRequest(), Collections.singleton(ExtendingView.class));
    Document page = BootstrapHandler.getBootstrapPage(new BootstrapContext(request, null, session, testUI));
    Elements allElements = page.head().getAllElements();
    Assert.assertTrue("Custom style should have been added to head.", allElements.stream().map(Object::toString).anyMatch(element -> element.equals("<link rel=\"import\" href=\"./frontend/bower_components/vaadin-lumo-styles/color.html\">")));
    allElements = page.body().getAllElements();
    // Note element 0 is the full head element.
    assertStringEquals("Custom style should have been added to head.", "<custom-style><style include=\"lumo-typography\"></style></custom-style>", allElements.get(2).toString());
    Assert.assertTrue("Style should have been wrapped in custom style", page.body().toString().contains("<custom-style><style include=\"lumo-typography\"></style></custom-style>"));
}
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) TargetElement(com.vaadin.flow.component.page.TargetElement) Registration(com.vaadin.flow.shared.Registration) PageTitle(com.vaadin.flow.router.PageTitle) Router(com.vaadin.flow.router.Router) Route(com.vaadin.flow.router.Route) RouteAlias(com.vaadin.flow.router.RouteAlias) Theme(com.vaadin.flow.theme.Theme) Assert.assertThat(org.junit.Assert.assertThat) Locale(java.util.Locale) Element(org.jsoup.nodes.Element) After(org.junit.After) UI(com.vaadin.flow.component.UI) Set(java.util.Set) StandardCharsets(java.nio.charset.StandardCharsets) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) 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) Matchers.is(org.hamcrest.Matchers.is) Elements(org.jsoup.select.Elements) ApplicationConstants(com.vaadin.flow.shared.ApplicationConstants) MockDeploymentConfiguration(com.vaadin.tests.util.MockDeploymentConfiguration) Matchers(org.mockito.Matchers) 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) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) HttpServletRequest(javax.servlet.http.HttpServletRequest) Tag(com.vaadin.flow.component.Tag) AbstractTheme(com.vaadin.flow.theme.AbstractTheme) Before(org.junit.Before) 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) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) InlineTemplate(com.vaadin.flow.template.angular.InlineTemplate) HtmlImport(com.vaadin.flow.component.dependency.HtmlImport) Mockito(org.mockito.Mockito) Assert(org.junit.Assert) Collections(java.util.Collections) Viewport(com.vaadin.flow.component.page.Viewport) ParentLayout(com.vaadin.flow.router.ParentLayout) Assert.assertEquals(org.junit.Assert.assertEquals) InputStream(java.io.InputStream) BootstrapContext(com.vaadin.flow.server.BootstrapHandler.BootstrapContext) Document(org.jsoup.nodes.Document) Elements(org.jsoup.select.Elements) 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