Skip to content

Commit

Permalink
Ещё один тест
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 authored Nov 3, 2024
1 parent 5f9406c commit 50a8179
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,24 @@ void prepare() {
var documentContext = TestUtils.getDocumentContextFromFile("./src/test/resources/context/symbol/MethodDescription.bsl");
var methods = documentContext.getSymbolTree().getMethods();

assertThat(methods).hasSize(15);
assertThat(methods).hasSize(16);

methodsWithDescription = methods.stream()
.map(MethodSymbol::getDescription)
.filter(Optional::isPresent)
.map(Optional::get)
.toList();

assertThat(methodsWithDescription.size()).isEqualTo(14);
assertThat(methodsWithDescription.size()).isEqualTo(15);
}
}

@Test
void testMethodWithAnnotationBeforeDescription() {
var method = methodsWithDescription.get(14);
assertThat(method.getDescription()).isEqualTo("// Описание процедуры");
}

@Test
void testMethodWithAnnotation() {
var method = methodsWithDescription.get(13);
Expand Down Expand Up @@ -437,4 +443,4 @@ void testMethod1() {
assertThat(method.getReturnedValue()).isEmpty();
assertThat(method.getLink()).isEmpty();
}
}
}

0 comments on commit 50a8179

Please sign in to comment.