{
@Test
public void testStringToBoolean() throws Exception
{
final MasterConversionService service = Sapphire.service( MasterConversionService.class );
assertEquals( Boolean.TRUE, service.convert( "true", Boolean.class ) );
assertEquals( Boolean.TRUE, service.convert( "TRUE", Boolean.class ) );
assertEquals( Boolean.TRUE, service.convert( "True", Boolean.class ) );
assertEquals( Boolean.TRUE, service.convert( "tRuE", Boolean.class ) );
assertEquals( Boolean.FALSE, service.convert( "false", Boolean.class ) );
assertEquals( Boolean.FALSE, service.convert( "FALSE", Boolean.class ) );
assertEquals( Boolean.FALSE, service.convert( "False", Boolean.class ) );
assertEquals( Boolean.FALSE, service.convert( "fAlSe", Boolean.class ) );
assertNull( service.convert( "yes", Boolean.class ) );
assertNull( service.convert( "no", Boolean.class ) );
assertNull( service.convert( "0", Boolean.class ) );
assertNull( service.convert( "1", Boolean.class ) );
assertNull( service.convert( "abcdef", Boolean.class ) );
}