mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
bimtester: steps, translate some attributes
This commit is contained in:
@@ -9,17 +9,25 @@ from utils import switch_locale
|
||||
the_lang = "en"
|
||||
|
||||
|
||||
@step("there are no {ifc_class} elements because {reason}")
|
||||
def step_impl(context, ifc_class, reason):
|
||||
@step("There are no {ifc_class} elements")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.no_eleclass_because_reason(
|
||||
aem.no_eleclass(
|
||||
context,
|
||||
ifc_class,
|
||||
reason
|
||||
ifc_class
|
||||
)
|
||||
|
||||
|
||||
@step('all {ifc_class} elements class attributes have a value')
|
||||
@step("There are no {ifc_class} elements because {reason}")
|
||||
def step_impl(context, ifc_class, reason):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.no_eleclass(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
|
||||
|
||||
@step("All {ifc_class} elements class attributes have a value")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.eleclass_have_class_attributes_with_a_value(
|
||||
@@ -28,7 +36,7 @@ def step_impl(context, ifc_class):
|
||||
)
|
||||
|
||||
|
||||
@step('all {ifc_class} elements have a name given')
|
||||
@step("All {ifc_class} elements have a name given")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.eleclass_has_name_with_a_value(
|
||||
@@ -37,7 +45,7 @@ def step_impl(context, ifc_class):
|
||||
)
|
||||
|
||||
|
||||
@step('all {ifc_class} elements have a description given')
|
||||
@step("All {ifc_class} elements have a description given")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.eleclass_has_description_with_a_value(
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
from behave import step
|
||||
|
||||
import attributes_eleclasses_methods as aem
|
||||
from utils import switch_locale
|
||||
|
||||
|
||||
the_lang = "de"
|
||||
|
||||
|
||||
@step("Es sind keine {ifc_class} Bauteile vorhanden")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.no_eleclass(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
|
||||
|
||||
@step("Aus folgendem Grund gibt es keine {ifc_class} Bauteile: {reason}")
|
||||
def step_impl(context, ifc_class, reason):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.no_eleclass(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
|
||||
|
||||
@step("Alle {ifc_class} Bauteilklassenattribute haben einen Wert")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.eleclass_have_class_attributes_with_a_value(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
|
||||
|
||||
@step("Bei allen {ifc_class} Bauteile ist der Name angegeben")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.eleclass_has_name_with_a_value(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
|
||||
|
||||
@step("Bei allen {ifc_class} Bauteile ist die Beschreibung angegeben")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.eleclass_has_description_with_a_value(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
@@ -0,0 +1,59 @@
|
||||
from behave import step
|
||||
|
||||
import attributes_eleclasses_methods as aem
|
||||
from utils import switch_locale
|
||||
|
||||
|
||||
the_lang = "fr"
|
||||
|
||||
|
||||
"""
|
||||
# TODO the next line needs translation
|
||||
@step("There are no {ifc_class} elements")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.no_eleclass(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
|
||||
|
||||
# TODO the next line needs translation
|
||||
@step("There are no {ifc_class} elements because {reason}")
|
||||
def step_impl(context, ifc_class, reason):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.no_eleclass(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
|
||||
|
||||
# TODO the next line needs translation
|
||||
@step("All {ifc_class} elements class attributes have a value")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.eleclass_have_class_attributes_with_a_value(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
|
||||
|
||||
# TODO the next line needs translation
|
||||
@step("All {ifc_class} elements have a name given")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.eleclass_has_name_with_a_value(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
|
||||
|
||||
# TODO the next line needs translation
|
||||
@step("All {ifc_class} elements have a description given")
|
||||
def step_impl(context, ifc_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
aem.eleclass_has_description_with_a_value(
|
||||
context,
|
||||
ifc_class
|
||||
)
|
||||
"""
|
||||
@@ -4,8 +4,8 @@ from utils import assert_elements
|
||||
from utils import IfcFile
|
||||
|
||||
|
||||
def no_eleclass_because_reason(
|
||||
context, ifc_class, reason
|
||||
def no_eleclass(
|
||||
context, ifc_class
|
||||
):
|
||||
|
||||
context.falseelems = []
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
from behave import step
|
||||
|
||||
import attributes_psets_methods as apm
|
||||
from utils import switch_locale
|
||||
|
||||
|
||||
the_lang = "de"
|
||||
|
||||
|
||||
@step("An alle {ifc_class} Bauteile ist im PSet {pset} das Attribut {aproperty} angehängt")
|
||||
def step_impl(context, ifc_class, aproperty, pset):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
apm.eleclass_has_property_in_pset(
|
||||
context,
|
||||
ifc_class,
|
||||
aproperty,
|
||||
pset
|
||||
)
|
||||
@@ -0,0 +1,21 @@
|
||||
from behave import step
|
||||
|
||||
import attributes_psets_methods as apm
|
||||
from utils import switch_locale
|
||||
|
||||
|
||||
the_lang = "fr"
|
||||
|
||||
|
||||
"""
|
||||
# TODO the next line needs translation
|
||||
@step("All {ifc_class} elements have an {aproperty} property in the {pset} pset")
|
||||
def step_impl(context, ifc_class, aproperty, pset):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
apm.eleclass_has_property_in_pset(
|
||||
context,
|
||||
ifc_class,
|
||||
aproperty,
|
||||
pset
|
||||
)
|
||||
"""
|
||||
@@ -0,0 +1,20 @@
|
||||
from behave import step
|
||||
|
||||
import geometric_detail_methods as gdm
|
||||
from utils import switch_locale
|
||||
|
||||
|
||||
the_lang = "fr"
|
||||
|
||||
|
||||
"""
|
||||
# TODO the next line needs translation
|
||||
@step("all {ifc_class} elements have an {representation_class} representation")
|
||||
def step_impl(context, ifc_class, representation_class):
|
||||
switch_locale(context.localedir, the_lang)
|
||||
gdm.eleclass_has_geometric_representation_of_specific_class(
|
||||
context,
|
||||
ifc_class,
|
||||
representation_class
|
||||
)
|
||||
"""
|
||||
Reference in New Issue
Block a user