ColorimetricColor { public String getCleCoul() { return this.cleCoul; } ColorimetricColor();  ColorimetricColor(int idColor);  ColorimetricColor(String hue, int lightness);  ColorimetricColor(String usualName);  ColorimetricColor(int r, int g, int b);  ColorimetricColor(int r, int g, int b, boolean reference);  ColorimetricColor(Color c);  ColorimetricColor(Color c, boolean reference);  ColorimetricColor(float l, float a, float b);  ColorimetricColor(float[] lab); int getIdColor(); void setIdColor(int id); String getHue(); void setHue(String hue); ColorSlice getSlice(ColorReferenceSystem crs); ColorWheel getWheel(ColorReferenceSystem crs); int getLightness(); void setLightness(int lightness); void setSaturation(int saturation); String getUsualName(); void setUsualName(String usualName); String getCleCoul(); void setCleCoul(String cleCoul); int getRedRGB(); void setRedRGB(int redRGB); int getGreenRGB(); void setGreenRGB(int greenRGB); int getBlueRGB(); void setBlueRGB(int blueRGB); int getXScreen(); void setXScreen(int x); int getYScreen(); void setYScreen(int y); Color toColor(); float[] toXYZ(); static float[] toXYZ(float[] lab); float[] getLab(); static float f(float t); float getCIELabL(); float getCIELabA(); float getCIELabB(); double getCIEChroma(); double getCIEHue(); static boolean labExistance(float l, float a, float b); void setL(float l); void setA(float a); void setB(float b); boolean equals(ColorimetricColor c); float maxRGB(); static float distanceCIElab(ColorimetricColor c1, ColorimetricColor c2); static float distanceRVB(ColorimetricColor c1, ColorimetricColor c2); static float CIELab_Lightness_Difference(ColorimetricColor c1,
      ColorimetricColor c2); static double CIELCh_Chroma_Difference(ColorimetricColor c1,
      ColorimetricColor c2); static double CIELCh_Hue_Difference(ColorimetricColor c1,
      ColorimetricColor c2); @Override String toString(); static void basicColorsComponents();  }
@Test public final void testColorimetricColorStringInt() { logger.info("--------------------------------------------------------------------------------------------------------------"); logger.info("Test method ColorimetricColor(String, int)"); logger.info(" Test 1 : setting of all the attributes"); ColorimetricColor cResult = new ColorimetricColor("Rouge", 0); ColorimetricColor cExpected = new ColorimetricColor(); cExpected.idColor = 57; cExpected.hue = "ROUGE"; cExpected.lightness = 1; cExpected.usualName = "ROUGE TRES CLAIR"; cExpected.cleCoul = "R1"; cExpected.redRGB = 254; cExpected.greenRGB = 230; cExpected.blueRGB = 219; cExpected.xScreen = 164; cExpected.yScreen = 164; compareColorimetricColor(cResult, cExpected); logger.info(" Test 2 : with a non existing color : abcdef "); cResult = new ColorimetricColor("abcdef", 1); cExpected = defaultColorimetric; compareColorimetricColor(cResult, cExpected); logger.info(" Test 3 : with a non existing lightness : 2012841"); cResult = new ColorimetricColor("Rouge", 2012841); cExpected = defaultColorimetric; compareColorimetricColor(cResult, cExpected); logger.info(" Test 4 : different existing combination of hue and lightness"); logger.info(" Test 4.1 : Rouge, Lightness = 0 => R1"); cResult = new ColorimetricColor("Rouge", 0); assertEquals("R1", cResult.getCleCoul()); logger.info(" Test 4.2 : Rouge, Lightness = 1 => R1"); cResult = new ColorimetricColor("Rouge", 1); assertEquals("R1", cResult.getCleCoul()); logger.info(" Test 4.3 : Rouge, Lightness = 5 => R5"); cResult = new ColorimetricColor("Rouge", 5); assertEquals("R5", cResult.getCleCoul()); logger.info(" Test 4.4 : Rouge, Lightness = 7 => R7"); cResult = new ColorimetricColor("Rouge", 7); assertEquals("R7", cResult.getCleCoul()); logger.info(" Test 4.5 : Rouge, Lightness = 8 => R8"); cResult = new ColorimetricColor("Rouge", 8); assertEquals("R7", cResult.getCleCoul()); logger.info(" Test 4.6 : Gris, Lightness = 0 => Bl0"); cResult = new ColorimetricColor("Gris", 0); assertEquals("Bl0", cResult.getCleCoul()); compareColorimetricColor(cResult, new ColorimetricColor(85)); logger.info(" Test 4.7 : Gris, Lightness = 1 => G1"); cResult = new ColorimetricColor("Gris", 1); assertEquals("G1", cResult.getCleCoul()); logger.info(" Test 4.8 : Gris, Lightness = 5 => G5"); cResult = new ColorimetricColor("Gris", 5); assertEquals("G5", cResult.getCleCoul()); logger.info(" Test 4.9 : Gris, Lightness = 7 => G7"); cResult = new ColorimetricColor("Gris", 7); assertEquals("G7", cResult.getCleCoul()); logger.info(" Test 4.10 : Gris, Lightness = 8 => N8"); cResult = new ColorimetricColor("Gris", 8); assertEquals("N8", cResult.getCleCoul()); compareColorimetricColor(cResult, new ColorimetricColor(86)); logger.info(" Test 4.11 : Noir, Lightness = 0 => Bl0"); cResult = new ColorimetricColor("Noir", 0); assertEquals("Bl0", cResult.getCleCoul()); compareColorimetricColor(cResult, new ColorimetricColor(85)); logger.info(" Test 4.12 : Noir, Lightness = 1 => G1"); cResult = new ColorimetricColor("Noir", 1); assertEquals("G1", cResult.getCleCoul()); logger.info(" Test 4.13 : Noir, Lightness = 7 => G7"); cResult = new ColorimetricColor("Noir", 7); assertEquals("G7", cResult.getCleCoul()); logger.info(" Test 4.14 : Noir, Lightness = 8 => N8"); cResult = new ColorimetricColor("Noir", 8); assertEquals("N8", cResult.getCleCoul()); logger.info(" Test 4.15 : Blanc, Lightness = 0 => Bl0"); cResult = new ColorimetricColor("Blanc", 0); assertEquals("Bl0", cResult.getCleCoul()); logger.info(" Test 4.16 : Blanc, Lightness = 1 => G1"); cResult = new ColorimetricColor("Blanc", 1); assertEquals("G1", cResult.getCleCoul()); logger.info(" Test 4.17 : Blanc, Lightness = 7 => G7"); cResult = new ColorimetricColor("Blanc", 7); assertEquals("G7", cResult.getCleCoul()); logger.info(" Test 4.18 : Blanc, Lightness = 8 => N8"); cResult = new ColorimetricColor("Blanc", 8); assertEquals("N8", cResult.getCleCoul()); compareColorimetricColor(cResult, new ColorimetricColor(86)); logger.info(" Test 5 : different non existing combination of hue and lightness"); logger.info(" Test 5.1 : Rouge, Lightness = 9 => Default ColorimetricColor"); cResult = new ColorimetricColor("Rouge", 9); compareColorimetricColor(cResult, defaultColorimetric); logger.info(" Test 5.2 : Gris, Lightness = 9 => Default ColorimetricColor"); cResult = new ColorimetricColor("Gris", 9); compareColorimetricColor(cResult, defaultColorimetric); logger.info(" Test 5.3 : Noir, Lightness = 88888 => Default ColorimetricColor"); cResult = new ColorimetricColor("Noir", 88888); compareColorimetricColor(cResult, defaultColorimetric); logger.info(" Test 5.5 : Blanc, Lightness = 9 => Default ColorimetricColor"); cResult = new ColorimetricColor("Blanc", 9); compareColorimetricColor(cResult, defaultColorimetric); logger.info(" Test 5.6 : Mauve, Lightness = 5 => Default ColorimetricColor"); cResult = new ColorimetricColor("Mauve", 5); compareColorimetricColor(cResult, defaultColorimetric); logger.info(" Test 6 : 2 particular combination of hue and lightness (calling constructor twice)"); logger.info(" Test 6.1 : Noir, Lightness = 8 => Default ColorimetricColor"); cResult = new ColorimetricColor("Noir", 8); cExpected = new ColorimetricColor("Gris", 8); compareColorimetricColor(cResult, cExpected); compareColorimetricColor(cResult, new ColorimetricColor(86)); logger.info(" Test 6.2 : Blanc, Lightness = 0 => Default ColorimetricColor"); cResult = new ColorimetricColor("Blanc", 0); cExpected = new ColorimetricColor("Gris", 0); compareColorimetricColor(cResult, cExpected); compareColorimetricColor(cResult, new ColorimetricColor(85)); logger.info(" Test 7 : with a non existing lightness : null"); cResult = new ColorimetricColor(null, 2012841); cExpected = defaultColorimetric; compareColorimetricColor(cResult, cExpected); }