-
Notifications
You must be signed in to change notification settings - Fork 64
Akita steps #146
Open
Kutueva
wants to merge
4
commits into
alfa-laboratory:master
Choose a base branch
from
Kutueva:test
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Akita steps #146
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Sat Jan 12 21:22:14 MSK 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,84 @@ | ||
@if "%DEBUG%" == "" @echo off | ||
@rem ########################################################################## | ||
@rem | ||
@rem Gradle startup script for Windows | ||
@rem | ||
@rem ########################################################################## | ||
|
||
@rem Set local scope for the variables with windows NT shell | ||
if "%OS%"=="Windows_NT" setlocal | ||
|
||
set DIRNAME=%~dp0 | ||
if "%DIRNAME%" == "" set DIRNAME=. | ||
set APP_BASE_NAME=%~n0 | ||
set APP_HOME=%DIRNAME% | ||
|
||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
set DEFAULT_JVM_OPTS= | ||
|
||
@rem Find java.exe | ||
if defined JAVA_HOME goto findJavaFromJavaHome | ||
|
||
set JAVA_EXE=java.exe | ||
%JAVA_EXE% -version >NUL 2>&1 | ||
if "%ERRORLEVEL%" == "0" goto init | ||
|
||
echo. | ||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||
echo. | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation. | ||
|
||
goto fail | ||
|
||
:findJavaFromJavaHome | ||
set JAVA_HOME=%JAVA_HOME:"=% | ||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe | ||
|
||
if exist "%JAVA_EXE%" goto init | ||
|
||
echo. | ||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | ||
echo. | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation. | ||
|
||
goto fail | ||
|
||
:init | ||
@rem Get command-line arguments, handling Windows variants | ||
|
||
if not "%OS%" == "Windows_NT" goto win9xME_args | ||
|
||
:win9xME_args | ||
@rem Slurp the command line arguments. | ||
set CMD_LINE_ARGS= | ||
set _SKIP=2 | ||
|
||
:win9xME_args_slurp | ||
if "x%~1" == "x" goto execute | ||
|
||
set CMD_LINE_ARGS=%* | ||
|
||
:execute | ||
@rem Setup the command line | ||
|
||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | ||
|
||
@rem Execute Gradle | ||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% | ||
|
||
:end | ||
@rem End local scope for the variables with windows NT shell | ||
if "%ERRORLEVEL%"=="0" goto mainEnd | ||
|
||
:fail | ||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | ||
rem the _cmd.exe /c_ return code! | ||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 | ||
exit /b 1 | ||
|
||
:mainEnd | ||
if "%OS%"=="Windows_NT" endlocal | ||
|
||
:omega | ||
@if "%DEBUG%" == "" @echo off | ||
@rem ########################################################################## | ||
@rem | ||
@rem Gradle startup script for Windows | ||
@rem | ||
@rem ########################################################################## | ||
@rem Set local scope for the variables with windows NT shell | ||
if "%OS%"=="Windows_NT" setlocal | ||
set DIRNAME=%~dp0 | ||
if "%DIRNAME%" == "" set DIRNAME=. | ||
set APP_BASE_NAME=%~n0 | ||
set APP_HOME=%DIRNAME% | ||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
set DEFAULT_JVM_OPTS= | ||
@rem Find java.exe | ||
if defined JAVA_HOME goto findJavaFromJavaHome | ||
set JAVA_EXE=java.exe | ||
%JAVA_EXE% -version >NUL 2>&1 | ||
if "%ERRORLEVEL%" == "0" goto init | ||
echo. | ||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||
echo. | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation. | ||
goto fail | ||
:findJavaFromJavaHome | ||
set JAVA_HOME=%JAVA_HOME:"=% | ||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe | ||
if exist "%JAVA_EXE%" goto init | ||
echo. | ||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | ||
echo. | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation. | ||
goto fail | ||
:init | ||
@rem Get command-line arguments, handling Windows variants | ||
if not "%OS%" == "Windows_NT" goto win9xME_args | ||
:win9xME_args | ||
@rem Slurp the command line arguments. | ||
set CMD_LINE_ARGS= | ||
set _SKIP=2 | ||
:win9xME_args_slurp | ||
if "x%~1" == "x" goto execute | ||
set CMD_LINE_ARGS=%* | ||
:execute | ||
@rem Setup the command line | ||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | ||
@rem Execute Gradle | ||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% | ||
:end | ||
@rem End local scope for the variables with windows NT shell | ||
if "%ERRORLEVEL%"=="0" goto mainEnd | ||
:fail | ||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | ||
rem the _cmd.exe /c_ return code! | ||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 | ||
exit /b 1 | ||
:mainEnd | ||
if "%OS%"=="Windows_NT" endlocal | ||
:omega |
43 changes: 43 additions & 0 deletions
43
src/main/java/ru/alfabank/alfatest/cucumber/utils/DateUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package ru.alfabank.alfatest.cucumber.utils; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
import java.time.LocalDate; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum DateUtils { | ||
|
||
YESTERDAY("вчера", LocalDate.now().minusDays(1)), | ||
TOMORROW("завтра", LocalDate.now().plusDays(1)), | ||
TODAY("сегодня", LocalDate.now()), | ||
MONTH_AGO("месяц назад", LocalDate.now().minusMonths(1)), | ||
THREE_MONTH_AGO("3 месяца назад", LocalDate.now().minusMonths(3)), | ||
YEAR_AGO("год назад", LocalDate.now().minusYears(1)), | ||
MONTH_AHEAD("месяц вперед", LocalDate.now().plusMonths(1)), | ||
THREE_MONTH_AHEAD("3 месяца вперед", LocalDate.now().plusMonths(3)), | ||
YEAR_AHEAD("год вперед", LocalDate.now().plusMonths(3)); | ||
|
||
private final String textDate; | ||
private final LocalDate date; | ||
|
||
private static final Map<String, LocalDate> DATES = new HashMap<>(); | ||
|
||
static { | ||
for (DateUtils date: values()) { | ||
DATES.put(date.getTextDate(), date.getDate()); | ||
} | ||
} | ||
|
||
public static LocalDate convertStringDateToValues(String expectedTextDate) throws IllegalArgumentException{ | ||
LocalDate date = DATES.get(expectedTextDate); | ||
|
||
if (Objects.isNull(date)) { | ||
throw new IllegalArgumentException(String.format("Некорректнное значение даты: %s", expectedTextDate)); | ||
} | ||
return date; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что случится, если сунуть сюда, скажем, стрингу «три месяца назад»?