-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Subject of the issue
Method org.lfenergy.compas.sct.commons.scl.dtt.AbstractDataAttributeAdapter.check() throws a ScdException with empty message in case EnumType does not exist.
- Version of CoMPAS : 0.2.16
Steps to reproduce
@Test
void myTest(){
// Given
TDataTypeTemplates tDataTypeTemplates = new TDataTypeTemplates();
TDOType tdoType = new TDOType();
TDA tda = new TDA();
tda.setBType(TPredefinedBasicTypeEnum.ENUM);
tda.setType("MyEnum");
tdoType.getSDOOrDA().add(tda);
tDataTypeTemplates.getDOType().add(tdoType);
DAAdapter daAdapter = new DAAdapter(new DOTypeAdapter(new DataTypeTemplateAdapter(null, tDataTypeTemplates), tdoType), tda);
// When & Then
assertThatThrownBy(() -> daAdapter.check(new DaTypeName("toto")))
.hasMessageMatching(".+");
}Expected behaviour
The test should succeed : the message of the exception should not be empty
Actual behaviour
The test fails : the message is an empty String
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
To do
Status
To do