mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
bimtester: steps, translate some project attribute tests
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
from behave import step
|
||||||
|
|
||||||
|
from utils import assert_attribute
|
||||||
|
from utils import IfcFile
|
||||||
|
from utils import switch_locale
|
||||||
|
|
||||||
|
|
||||||
|
the_lang = "de"
|
||||||
|
|
||||||
|
|
||||||
|
@step("Die Globale Identifikationskennung (Globally Unique Identifier = GUID) des Projektes ist {guid}")
|
||||||
|
def step_impl(context, guid):
|
||||||
|
switch_locale(context.localedir, the_lang)
|
||||||
|
assert_attribute(IfcFile.get().by_type("IfcProject")[0], "GlobalId", guid)
|
||||||
|
|
||||||
|
|
||||||
|
@step('Der Name, die Abkürzung oder die Kurzkennung des Projektes ist "{value}"')
|
||||||
|
def step_impl(context, value):
|
||||||
|
switch_locale(context.localedir, the_lang)
|
||||||
|
assert_attribute(IfcFile.get().by_type("IfcProject")[0], "Name", value)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
from behave import step
|
||||||
|
|
||||||
|
from utils import assert_attribute
|
||||||
|
from utils import IfcFile
|
||||||
|
from utils import switch_locale
|
||||||
|
|
||||||
|
|
||||||
|
the_lang = "fr"
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
# TODO the next line needs translation
|
||||||
|
@step("The project must have an identifier of {guid}")
|
||||||
|
def step_impl(context, guid):
|
||||||
|
switch_locale(context.localedir, the_lang)
|
||||||
|
assert_attribute(IfcFile.get().by_type("IfcProject")[0], "GlobalId", guid)
|
||||||
|
|
||||||
|
|
||||||
|
@step('The project name, code, or short identifier must be "{value}"')
|
||||||
|
def step_impl(context, value):
|
||||||
|
switch_locale(context.localedir, the_lang)
|
||||||
|
assert_attribute(IfcFile.get().by_type("IfcProject")[0], "Name", value)
|
||||||
|
"""
|
||||||
@@ -14,4 +14,4 @@ Szenario: Bereitstellen von IFC-Daten
|
|||||||
|
|
||||||
|
|
||||||
Szenario: Projektinformationen
|
Szenario: Projektinformationen
|
||||||
* The project name, code, or short identifier must be "BIMTester Example 1"
|
* Der Name, die Abkürzung oder die Kurzkennung des Projektes ist "BIMTester Example 1"
|
||||||
|
|||||||
Reference in New Issue
Block a user