Skip to content

Commit

Permalink
typo fixes shoud(l) -> should
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Feb 15, 2022
1 parent 14966db commit 749fcd3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ protected List<IColumn<PO, String>> getViewColumnsTransformed(List<GuiObjectColu
return getViewColumnsTransformed(customColumns, true);
}

protected List<IColumn<PO, String>> getViewColumnsTransformed(List<GuiObjectColumnType> customColumns, boolean shoudlCheckForNameColumn){
protected List<IColumn<PO, String>> getViewColumnsTransformed(List<GuiObjectColumnType> customColumns, boolean shouldCheckForNameColumn){
List<IColumn<PO, String>> columns = new ArrayList<>();
if (customColumns == null || customColumns.isEmpty()) {
return columns;
Expand All @@ -501,7 +501,7 @@ protected List<IColumn<PO, String>> getViewColumnsTransformed(List<GuiObjectColu

if (WebComponentUtil.getElementVisibility(customColumn.getVisibility())) {
IModel<String> columnDisplayModel = createColumnDisplayModel(customColumn);
if (customColumns.indexOf(customColumn) == 0 && shoudlCheckForNameColumn) {
if (customColumns.indexOf(customColumn) == 0 && shouldCheckForNameColumn) {
column = createNameColumn(columnDisplayModel, customColumn, columnPath, expression);
} else {
column = createCustomExportableColumn(columnDisplayModel, customColumn, columnPath, expression);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* @author skublik
*/
@ContextConfiguration(locations = {"classpath:ctx-notifications-test.xml"})
@ContextConfiguration(locations = { "classpath:ctx-notifications-test.xml" })
public class TestTransportUtils extends AbstractSpringTest {

@Autowired protected ExpressionFactory expressionFactory;
Expand Down Expand Up @@ -71,18 +71,17 @@ public void test010CheckVariablesWhiteList() {
// WHEN
TransportUtil.validateRecipient(allowRecipient, forbiddenRecipient, recipients, config, task, task.getResult(), expressionFactory, MiscSchemaUtil.getExpressionProfile(), logger);

// THEN
then();

assertTrue("Expected <4> allowed recipient(s), but was <" + allowRecipient.size() + ">", allowRecipient.size() == 4);
assertTrue("janko@evodevel.com shoud be allowed, but isn't.", allowRecipient.contains("janko@evodevel.com"));
assertTrue("janko@evolveum.com shoud be allowed, but isn't.", allowRecipient.contains("janko@evolveum.com"));
assertTrue("viliam@evodevel.com shoud be allowed, but isn't.", allowRecipient.contains("viliam@evodevel.com"));
assertTrue("majka@evodevel.eu shoud be allowed, but isn't.", allowRecipient.contains("majka@evodevel.eu"));
assertTrue("janko@evodevel.com should be allowed, but isn't.", allowRecipient.contains("janko@evodevel.com"));
assertTrue("janko@evolveum.com should be allowed, but isn't.", allowRecipient.contains("janko@evolveum.com"));
assertTrue("viliam@evodevel.com should be allowed, but isn't.", allowRecipient.contains("viliam@evodevel.com"));
assertTrue("majka@evodevel.eu should be allowed, but isn't.", allowRecipient.contains("majka@evodevel.eu"));

assertTrue("Expected <2> forbidden recipient(s), but was <" + forbiddenRecipient.size() + ">", forbiddenRecipient.size() == 2);
assertTrue("jack@evodevel.sk shoud be forbidden, but isn't.", forbiddenRecipient.contains("jack@evodevel.sk"));
assertTrue("janko@evolveum.eu shoud be forbidden, but isn't.", forbiddenRecipient.contains("janko@evolveum.eu"));
assertTrue("jack@evodevel.sk should be forbidden, but isn't.", forbiddenRecipient.contains("jack@evodevel.sk"));
assertTrue("janko@evolveum.eu should be forbidden, but isn't.", forbiddenRecipient.contains("janko@evolveum.eu"));
}

@Test
Expand Down Expand Up @@ -110,18 +109,16 @@ public void test020CheckVariablesBlackList() {
// WHEN
TransportUtil.validateRecipient(allowRecipient, forbiddenRecipient, recipients, config, task, task.getResult(), expressionFactory, MiscSchemaUtil.getExpressionProfile(), logger);

// THEN
then();

assertTrue("Expected <4> forbidden recipient(s), but was <" + forbiddenRecipient.size() + ">", forbiddenRecipient.size() == 4);
assertTrue("janko@evodevel.com shoud be forbidden, but isn't.", forbiddenRecipient.contains("janko@evodevel.com"));
assertTrue("janko@evolveum.com shoud be forbidden, but isn't.", forbiddenRecipient.contains("janko@evolveum.com"));
assertTrue("viliam@evodevel.com shoud be forbidden, but isn't.", forbiddenRecipient.contains("viliam@evodevel.com"));
assertTrue("majka@evodevel.eu shoud be forbidden, but isn't.", forbiddenRecipient.contains("majka@evodevel.eu"));
assertTrue("janko@evodevel.com should be forbidden, but isn't.", forbiddenRecipient.contains("janko@evodevel.com"));
assertTrue("janko@evolveum.com should be forbidden, but isn't.", forbiddenRecipient.contains("janko@evolveum.com"));
assertTrue("viliam@evodevel.com should be forbidden, but isn't.", forbiddenRecipient.contains("viliam@evodevel.com"));
assertTrue("majka@evodevel.eu should be forbidden, but isn't.", forbiddenRecipient.contains("majka@evodevel.eu"));

assertTrue("Expected <2> allowed recipient(s), but was <" + allowRecipient.size() + ">", allowRecipient.size() == 2);
assertTrue("jack@evodevel.sk shoud be allowed, but isn't.", allowRecipient.contains("jack@evodevel.sk"));
assertTrue("janko@evolveum.eu shoud be allowed, but isn't.", allowRecipient.contains("janko@evolveum.eu"));
assertTrue("jack@evodevel.sk should be allowed, but isn't.", allowRecipient.contains("jack@evodevel.sk"));
assertTrue("janko@evolveum.eu should be allowed, but isn't.", allowRecipient.contains("janko@evolveum.eu"));
}

}

0 comments on commit 749fcd3

Please sign in to comment.