Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

add assumed and ignored tests #37

Merged
merged 2 commits into from
Oct 24, 2019
Merged

add assumed and ignored tests #37

merged 2 commits into from
Oct 24, 2019

Conversation

viclovsky
Copy link
Collaborator

No description provided.

@@ -179,4 +182,28 @@ open class AllureRunListener(private val lifecycle: AllureLifecycle = AllureComm
return container
}

private fun getIgnoredMessage(description: Description): StatusDetails {
val ignore = description.getAnnotation(Ignore::class.java)
val message = if ((ignore != null) && ignore.value.isNotEmpty())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (ignore?.value?.isNotEmpty() == true)

return StatusDetails(message = message)
}

private fun createTestResult(description: Description): TestResult {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно createTestResult(description: Description): TestResult = TestResult(

)

Label("testClass", description.className),
Label("testMethod", description.methodName),
Label("suite", getClassDisplayName(description)))
+ getLabels(description)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему бы эти лейблы тоже не генерить в getLabels()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Так было изначально, я пока думаю не трогать

@@ -2,6 +2,7 @@ apply plugin: 'kotlin'

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
implementation "junit:junit:${jUnitVersion}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

кажется, фигурные скобки не нужны

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

будет рефакторинг - думаю снесу здесь и везде

@viclovsky viclovsky merged commit cd415ee into master Oct 24, 2019
@viclovsky viclovsky deleted the ignored_assumed branch October 24, 2019 12:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants