@Test public void test_should_convert_entity_to_domain() { Tenant tenant = Tenant.builder() .id(1L) .code("AP.KURNOOL") .name("kurnool") .description("description") .logoId("logoid") .imageId("imageid") .domainUrl("domainUrl") .type(TenantType.CITY) .twitterUrl("twitterUrl") .facebookUrl("facebookUrl") .address("address") .contactNumber("contactNumber") .helplineNumber("helpLineNumber") .emailId("email") .build(); org.egov.tenant.domain.model.Tenant tenantModel = tenant.toDomain(); assertThat(tenantModel.getId()).isEqualTo(1); assertThat(tenantModel.getCode()).isEqualTo("AP.KURNOOL"); assertThat(tenantModel.getName()).isEqualTo("kurnool"); assertThat(tenantModel.getDescription()).isEqualTo("description"); assertThat(tenantModel.getLogoId()).isEqualTo("logoid"); assertThat(tenantModel.getImageId()).isEqualTo("imageid"); assertThat(tenantModel.getDomainUrl()).isEqualTo("domainUrl"); assertThat(tenantModel.getType()).isEqualTo(TenantType.CITY); assertThat(tenantModel.getTwitterUrl()).isEqualTo("twitterUrl"); assertThat(tenantModel.getFacebookUrl()).isEqualTo("facebookUrl"); assertThat(tenantModel.getEmailId()).isEqualTo("email"); assertThat(tenantModel.getAddress()).isEqualTo("address"); assertThat(tenantModel.getContactNumber()).isEqualTo("contactNumber"); assertThat(tenantModel.getHelpLineNumber()).isEqualTo("helpLineNumber"); }
public org.egov.tenant.domain.model.Tenant toDomain() { return org.egov.tenant.domain.model.Tenant.builder() .id(id) .code(code) .name(name) .description(description) .imageId(imageId) .logoId(logoId) .domainUrl(domainUrl) .type(type.toString()) .twitterUrl(twitterUrl) .facebookUrl(facebookUrl) .emailId(emailId) .address(address) .contactNumber(contactNumber) .helpLineNumber(helplineNumber) .build(); }
Tenant { public org.egov.tenant.domain.model.Tenant toDomain() { return org.egov.tenant.domain.model.Tenant.builder() .id(id) .code(code) .name(name) .description(description) .imageId(imageId) .logoId(logoId) .domainUrl(domainUrl) .type(type.toString()) .twitterUrl(twitterUrl) .facebookUrl(facebookUrl) .emailId(emailId) .address(address) .contactNumber(contactNumber) .helpLineNumber(helplineNumber) .build(); } }
Tenant { public org.egov.tenant.domain.model.Tenant toDomain() { return org.egov.tenant.domain.model.Tenant.builder() .id(id) .code(code) .name(name) .description(description) .imageId(imageId) .logoId(logoId) .domainUrl(domainUrl) .type(type.toString()) .twitterUrl(twitterUrl) .facebookUrl(facebookUrl) .emailId(emailId) .address(address) .contactNumber(contactNumber) .helpLineNumber(helplineNumber) .build(); }  }
Tenant { public org.egov.tenant.domain.model.Tenant toDomain() { return org.egov.tenant.domain.model.Tenant.builder() .id(id) .code(code) .name(name) .description(description) .imageId(imageId) .logoId(logoId) .domainUrl(domainUrl) .type(type.toString()) .twitterUrl(twitterUrl) .facebookUrl(facebookUrl) .emailId(emailId) .address(address) .contactNumber(contactNumber) .helpLineNumber(helplineNumber) .build(); }  org.egov.tenant.domain.model.Tenant toDomain(); }
Tenant { public org.egov.tenant.domain.model.Tenant toDomain() { return org.egov.tenant.domain.model.Tenant.builder() .id(id) .code(code) .name(name) .description(description) .imageId(imageId) .logoId(logoId) .domainUrl(domainUrl) .type(type.toString()) .twitterUrl(twitterUrl) .facebookUrl(facebookUrl) .emailId(emailId) .address(address) .contactNumber(contactNumber) .helpLineNumber(helplineNumber) .build(); }  org.egov.tenant.domain.model.Tenant toDomain(); static String ID; }