Skip to content

Commit

Permalink
Merge pull request #3217 from 1c-syntax/dependabot/gradle/org.springf…
Browse files Browse the repository at this point in the history
…ramework.boot-3.2.1
  • Loading branch information
dependabot[bot] authored Dec 26, 2023
2 parents af747a3 + 5c35d4d commit 5fb31b5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
id("io.freefair.maven-central.validate-poms") version "8.4"
id("me.qoomon.git-versioning") version "6.4.3"
id("com.github.ben-manes.versions") version "0.50.0"
id("org.springframework.boot") version "3.1.5"
id("org.springframework.boot") version "3.2.1"
id("io.spring.dependency-management") version "1.1.4"
id("io.github.1c-syntax.bslls-dev-tools") version "0.7.3"
id("ru.vyarus.pom") version "2.2.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,23 @@
package com.github._1c_syntax.bsl.languageserver.infrastructure;

import com.github._1c_syntax.utils.StringInterner;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Role;

/**
* Конфигурация бинов из 1c-syntax/utils.
*/
@Configuration
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public class UtilsConfiguration {

/**
* @return Настроенный объект интернирователя строк.
*/
@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public StringInterner stringInterner() {
return new StringInterner();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,16 @@ private void checkMockHandler(ModuleType type, boolean noneModules) {
var documentContext = spy(getDocumentContext());
when(documentContext.getModuleType()).thenReturn(type);

final var infoReg = spy(context.getConfiguration().findChild(MdoReference.create(MDOType.INFORMATION_REGISTER,
"РегистрСведений1")).get()
final var infoReg = spy((InformationRegister) context.getConfiguration().findChild(MdoReference.create(MDOType.INFORMATION_REGISTER,
"РегистрСведений1")).orElseThrow()
);
var spyMdo = spy((InformationRegister) infoReg);

when(documentContext.getMdObject()).thenReturn(Optional.of(spyMdo));
when(documentContext.getMdObject()).thenReturn(Optional.of(infoReg));

if (noneModules) {
when(spyMdo.getModules()).thenReturn(Collections.emptyList());
when(infoReg.getModules()).thenReturn(Collections.emptyList());

List<MD> children = List.of(spyMdo);
List<MD> children = List.of(infoReg);

var configuration = spy(context.getConfiguration());
when(configuration.getChildren()).thenReturn(children);
Expand Down

0 comments on commit 5fb31b5

Please sign in to comment.