use of com.github._1c_syntax.mdclasses.mdo.MDCommonModule in project bsl-language-server by 1c-syntax.
the class CachedPublicDiagnosticTest method getDocumentContextFromFile.
@SneakyThrows
void getDocumentContextFromFile(Path testFile) {
Path path = Absolute.path(PATH_TO_METADATA);
Path moduleFile = Paths.get(PATH_TO_MODULE_FILE).toAbsolutePath();
initServerContext(path);
var configuration = context.getConfiguration();
documentContext = spy(TestUtils.getDocumentContext(testFile.toUri(), FileUtils.readFileToString(testFile.toFile(), StandardCharsets.UTF_8), context));
module = spy((MDCommonModule) configuration.getModulesByObject().get(moduleFile.toUri()));
}
use of com.github._1c_syntax.mdclasses.mdo.MDCommonModule in project bsl-language-server by 1c-syntax.
the class CommonModuleInvalidTypeDiagnosticTest method getDocumentContextFromFile.
@SneakyThrows
void getDocumentContextFromFile() {
Path path = Absolute.path(PATH_TO_METADATA);
Path testFile = Paths.get(PATH_TO_MODULE_FILE).toAbsolutePath();
initServerContext(path);
var configuration = context.getConfiguration();
documentContext = spy(TestUtils.getDocumentContext(testFile.toUri(), FileUtils.readFileToString(testFile.toFile(), StandardCharsets.UTF_8), context));
module = spy((MDCommonModule) configuration.getModulesByObject().get(documentContext.getUri()));
}
use of com.github._1c_syntax.mdclasses.mdo.MDCommonModule in project bsl-language-server by 1c-syntax.
the class CommonModuleNameCachedDiagnosticTest method getDocumentContextFromFile.
@SneakyThrows
void getDocumentContextFromFile() {
Path path = Absolute.path(PATH_TO_METADATA);
Path testFile = Paths.get(PATH_TO_MODULE_FILE).toAbsolutePath();
initServerContext(path);
var configuration = context.getConfiguration();
documentContext = spy(TestUtils.getDocumentContext(testFile.toUri(), FileUtils.readFileToString(testFile.toFile(), StandardCharsets.UTF_8), context));
module = spy((MDCommonModule) configuration.getModulesByObject().get(documentContext.getUri()));
}
use of com.github._1c_syntax.mdclasses.mdo.MDCommonModule in project bsl-language-server by 1c-syntax.
the class CommonModuleNameClientServerDiagnosticTest method getDocumentContextFromFile.
@SneakyThrows
void getDocumentContextFromFile() {
Path path = Absolute.path(PATH_TO_METADATA);
Path testFile = Paths.get(PATH_TO_MODULE_FILE).toAbsolutePath();
initServerContext(path);
var configuration = context.getConfiguration();
documentContext = spy(TestUtils.getDocumentContext(testFile.toUri(), FileUtils.readFileToString(testFile.toFile(), StandardCharsets.UTF_8), context));
module = spy((MDCommonModule) configuration.getModulesByObject().get(documentContext.getUri()));
}
use of com.github._1c_syntax.mdclasses.mdo.MDCommonModule in project bsl-language-server by 1c-syntax.
the class CommonModuleNameGlobalDiagnosticTest method getDocumentContextFromFile.
@SneakyThrows
void getDocumentContextFromFile() {
Path path = Absolute.path(PATH_TO_METADATA);
Path testFile = Paths.get(PATH_TO_MODULE_FILE).toAbsolutePath();
initServerContext(path);
var configuration = context.getConfiguration();
documentContext = spy(TestUtils.getDocumentContext(testFile.toUri(), FileUtils.readFileToString(testFile.toFile(), StandardCharsets.UTF_8), context));
module = spy((MDCommonModule) configuration.getModulesByObject().get(documentContext.getUri()));
}
Aggregations