Bim4Everyone.RevitFiltration.Tests: Добавлены тесты для корневой части библиотеки по фильтрации - #6
Merged
Merged
Conversation
dosymep
approved these changes
Mar 24, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Краткое описание
Bim4Everyone.RevitFiltrationLogicalFilterParser.TryParse— теперь перехватываетJsonException(покрывает как некорректный JSON, так и ошибки десериализации)Тесты
Unit тесты
LogicalFilterFactoryTests— фабрика создаёт And/Or фильтрыLogicalFilterArgumentValidationTests— проверка null-аргументов вBuild()LogicalFilterBuildTests— проверяет корректный подтипElementFilterдля правил (equals, hasvalue, begins with, greater-or-equal и др.)LogicalFilterParserTests— сериализации/десериализации для правил и фильтровИнтеграционные тесты — создают реальные элементы в Revit, билдят
ElementFilter, передают вFilteredElementCollectorи проверяют точное совпадение количества элементовLogicalFilterBuildArchIntegrationTests: архитектурные элементы (стены и перекрытия) через строковые правила (BeginsWithRule,ContainsRule,EndsWithRule) и числовые правила (CURVE_ELEM_LENGTH,HOST_AREA_COMPUTED)LogicalFilterBuildMepIntegrationTests(8 тестов): элементы ВИС (трубы и воздуховоды) через строковые правила и числовые правилаCURVE_ELEM_LENGTHDocument life-cycle сделан через
[HookExecutor<RevitThreadExecutor>]в соответствии с документацией из RevitUnit — хуки уровня класса для разделяемых документов, хуки уровня теста для изолированных документов в тестах с созданием элементовРезультат выполнения тестов для 2022 Revit