Search in sources :

Example 1 with BooleanSerialiser

use of uk.gov.gchq.gaffer.serialisation.implementation.BooleanSerialiser in project Gaffer by gchq.

the class SerialisationFactoryTest method shouldNotReAddClassToFactory.

@Test
public void shouldNotReAddClassToFactory() throws SerialisationException {
    // Given / new factory created with only 1 element
    final Serialiser[] serialisers = new Serialiser[] { new BooleanSerialiser() };
    final SerialisationFactory factory = new SerialisationFactory(serialisers);
    // When
    factory.addSerialisers(new BooleanSerialiser());
    // Then / still has 1 element, BooleanSerialiser already existed
    assertEquals(1, factory.getSerialisers().size());
}
Also used : BooleanSerialiser(uk.gov.gchq.gaffer.serialisation.implementation.BooleanSerialiser) Serialiser(uk.gov.gchq.gaffer.serialisation.Serialiser) StringSerialiser(uk.gov.gchq.gaffer.serialisation.implementation.StringSerialiser) RawDoubleSerialiser(uk.gov.gchq.gaffer.serialisation.implementation.raw.RawDoubleSerialiser) OrderedIntegerSerialiser(uk.gov.gchq.gaffer.serialisation.implementation.ordered.OrderedIntegerSerialiser) RawDateSerialiser(uk.gov.gchq.gaffer.serialisation.implementation.raw.RawDateSerialiser) JavaSerialiser(uk.gov.gchq.gaffer.serialisation.implementation.JavaSerialiser) BooleanSerialiser(uk.gov.gchq.gaffer.serialisation.implementation.BooleanSerialiser) RawFloatSerialiser(uk.gov.gchq.gaffer.serialisation.implementation.raw.RawFloatSerialiser) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 Serialiser (uk.gov.gchq.gaffer.serialisation.Serialiser)1 BooleanSerialiser (uk.gov.gchq.gaffer.serialisation.implementation.BooleanSerialiser)1 JavaSerialiser (uk.gov.gchq.gaffer.serialisation.implementation.JavaSerialiser)1 StringSerialiser (uk.gov.gchq.gaffer.serialisation.implementation.StringSerialiser)1 OrderedIntegerSerialiser (uk.gov.gchq.gaffer.serialisation.implementation.ordered.OrderedIntegerSerialiser)1 RawDateSerialiser (uk.gov.gchq.gaffer.serialisation.implementation.raw.RawDateSerialiser)1 RawDoubleSerialiser (uk.gov.gchq.gaffer.serialisation.implementation.raw.RawDoubleSerialiser)1 RawFloatSerialiser (uk.gov.gchq.gaffer.serialisation.implementation.raw.RawFloatSerialiser)1