@@ -466,34 +466,10 @@ public void testArchivedNonExcludedColorCanBeImported() throws Exception
466466 assertNull ("an archived non-excluded color should still be insertable" , saveSample (st , sampleRow ("s1" , gray ), false ));
467467 }
468468
469- @ Test
470- public void testCannotInsertSampleWithBadColor () throws Exception
471- {
472-
473- ExpSampleType st = createSampleType ("ColorCaseST" );
474- insertColor ("Red" , "#ff0000" , false );
475-
476- Map <String , Object > exactCase = new CaseInsensitiveHashMap <>();
477- exactCase .put ("Name" , "exactCase" );
478- exactCase .put ("ExpMaterialColor" , "Red" );
479- assertNull ("a sample referencing the color by its exact label should import" , saveSample (st , exactCase , false ));
480-
481- // cannot insert sample with colr differing by case
482- Map <String , Object > wrongCase = new CaseInsensitiveHashMap <>();
483- wrongCase .put ("Name" , "wrongCase" );
484- wrongCase .put ("ExpMaterialColor" , "red" );
485- String err = saveSample (st , wrongCase , false );
486- assertNotNull ("a color label differing only by case should not resolve to the existing color" , err );
487- assertTrue ("Unexpected error: " + err , err .toLowerCase ().contains ("not found" ));
488-
489- // cannot insert sample with non-existent color
490- Map <String , Object > unknown = new CaseInsensitiveHashMap <>();
491- unknown .put ("Name" , "unknownColor" );
492- unknown .put ("ExpMaterialColor" , "Purple" ); // no such color exists
493- err = saveSample (st , unknown , false );
494- assertNotNull ("a sample referencing a nonexistent color should be rejected" , err );
495- assertTrue ("Unexpected error: " + err , err .toLowerCase ().contains ("not found" ));
496- }
469+ // Note: resolving a color by its Label (and rejecting a wrong-case or nonexistent label) is an import-path
470+ // concern — the label -> rowId remap happens in the ETL/import DataIterator, not in a direct QUS insertRows
471+ // (which expects the ExpMaterialColor key). That coverage lives in the remoteapi SMSampleColorsApiTest, which
472+ // imports by label via QueryApiHelper.importData.
497473
498474 // ---- exclusion service methods --------------------------------------
499475
0 commit comments