use of gov.ca.cwds.rest.api.domain.cms.SystemCodeCache in project api-core by ca-cwds.
the class SystemCodeIdValidatorTest method setupClass.
@BeforeClass
public static void setupClass() {
SystemCodeCache systemCodeCache = new TestSystemCodeCache();
validator = Validation.buildDefaultValidatorFactory().getValidator();
}
use of gov.ca.cwds.rest.api.domain.cms.SystemCodeCache in project api-core by ca-cwds.
the class CmsSystemCodeSerializerTest method buildSerializer_Args$ISystemCodeCache$boolean$boolean$boolean.
@Test
public void buildSerializer_Args$ISystemCodeCache$boolean$boolean$boolean() throws Exception {
SystemCodeCache cache = null;
CmsSystemCodeSerializer target = new CmsSystemCodeSerializer(cache);
boolean showShortDescription = false;
boolean showLogicalId = false;
boolean showMetaCategory = false;
CmsSystemCodeSerializer actual = target.buildSerializer(CACHE, showShortDescription, showLogicalId, showMetaCategory);
CmsSystemCodeSerializer expected = new CmsSystemCodeSerializer(CACHE, showShortDescription, showLogicalId, showMetaCategory);
assertThat(actual, is(equalTo(expected)));
}
use of gov.ca.cwds.rest.api.domain.cms.SystemCodeCache in project api-core by ca-cwds.
the class CmsSystemCodeSerializerTest method buildBits_Args$booleanArray.
@Test
public void buildBits_Args$booleanArray() throws Exception {
SystemCodeCache cache = null;
CmsSystemCodeSerializer target = new CmsSystemCodeSerializer(cache);
// given
boolean[] flags = new boolean[] {};
// e.g. : given(mocked.called()).willReturn(1);
// when
BitSet actual = target.buildBits(flags);
// then
// e.g. : verify(mocked).called();
BitSet expected = new BitSet(0);
assertThat(actual, is(equalTo(expected)));
}
use of gov.ca.cwds.rest.api.domain.cms.SystemCodeCache in project api-core by ca-cwds.
the class CmsSystemCodeSerializerTest method instantiation.
@Test
public void instantiation() throws Exception {
SystemCodeCache cache = null;
CmsSystemCodeSerializer target = new CmsSystemCodeSerializer(cache);
assertThat(target, notNullValue());
}
use of gov.ca.cwds.rest.api.domain.cms.SystemCodeCache in project api-core by ca-cwds.
the class CmsSystemCodeSerializerTest method serialize_Args$Short$JsonGenerator$SerializerProvider.
@Test
public void serialize_Args$Short$JsonGenerator$SerializerProvider() throws Exception {
SystemCodeCache cache = null;
CmsSystemCodeSerializer target = new CmsSystemCodeSerializer(cache);
// given
Short s = null;
JsonGenerator jgen = mock(JsonGenerator.class);
SerializerProvider sp = mock(SerializerProvider.class);
// e.g. : given(mocked.called()).willReturn(1);
// when
target.serialize(s, jgen, sp);
// then
// e.g. : verify(mocked).called();
}
Aggregations