ajout dans isValid de la vérification que les Property sont valid + HtmlRenerator terminé
This commit is contained in:
@@ -5,7 +5,7 @@ import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
@@ -110,6 +110,20 @@ public class test_V2 {
|
||||
assertTrue(config1.isValid());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_NotCompatibleProperty(){
|
||||
ConfigurationImpl config1 = new ConfigurationImpl(cm);
|
||||
config1.selectPart(EG210);
|
||||
config1.selectPart(TSF7);
|
||||
config1.selectPart(XS);
|
||||
config1.selectPart(IS);
|
||||
|
||||
config1.getPart(exterior).setProperty("color","gsqgsdf");
|
||||
|
||||
assertTrue(config1.getPart(exterior).getProperty("color").get()=="gsqgsdf");
|
||||
assertFalse(config1.isValid());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_NotProperty(){
|
||||
ConfigurationImpl config1 = new ConfigurationImpl(cm);
|
||||
@@ -118,7 +132,7 @@ public class test_V2 {
|
||||
config1.selectPart(XS);
|
||||
config1.selectPart(IS);
|
||||
|
||||
assertTrue(config1.getPart(exterior).getProperty("color").isEmpty());
|
||||
assertTrue(config1.getPart(exterior).getProperty("color").get()=="white");
|
||||
assertTrue(config1.isValid());
|
||||
}
|
||||
|
||||
@@ -158,4 +172,19 @@ public class test_V2 {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void test_html2(){
|
||||
ConfigurationImpl config1 = new ConfigurationImpl(cm);
|
||||
config1.selectPart(EG210);
|
||||
config1.selectPart(TSF7);
|
||||
config1.selectPart(XS);
|
||||
config1.selectPart(IS);
|
||||
config1.getPart(exterior).setProperty("color", "red");
|
||||
try {
|
||||
HtmlGenerator.generateHTML(config1);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user