Search in sources :

Example 36 with Organisation

use of org.estatio.module.party.dom.Organisation in project estatio by estatio.

the class ChamberOfCommerceCodeLookUpServiceTest method getChamberOfCommerceCodeCandidatesByCode_works.

@Test
public void getChamberOfCommerceCodeCandidatesByCode_works() throws Exception {
    // given
    ChamberOfCommerceCodeLookUpService service = new ChamberOfCommerceCodeLookUpService() {

        @Override
        OrganisationNameNumberViewModel findCandidateForFranceByCode(final String code) {
            return new OrganisationNameNumberViewModel();
        }
    };
    Organisation organisation = new Organisation() {

        @Override
        public String getAtPath() {
            return "/FRA";
        }
    };
    organisation.setName("Company");
    // when
    OrganisationNameNumberViewModel result = service.getChamberOfCommerceCodeCandidatesByCode(organisation.getName(), organisation.getAtPath());
    // then
    Assertions.assertThat(result).isNotNull();
}
Also used : Organisation(org.estatio.module.party.dom.Organisation) Test(org.junit.Test)

Example 37 with Organisation

use of org.estatio.module.party.dom.Organisation in project estatio by estatio.

the class Order_verifySupplier method $$.

@Action(semantics = SemanticsOf.IDEMPOTENT_ARE_YOU_SURE)
public Order $$(final OrganisationNameNumberViewModel organisationCheck) {
    Organisation orgToVerify = (Organisation) order.getSeller();
    orgToVerify.verify(organisationCheck);
    return order;
}
Also used : Organisation(org.estatio.module.party.dom.Organisation) Action(org.apache.isis.applib.annotation.Action)

Aggregations

Organisation (org.estatio.module.party.dom.Organisation)37 Test (org.junit.Test)26 Expectations (org.jmock.Expectations)18 Party (org.estatio.module.party.dom.Party)13 IncomingInvoice (org.estatio.module.capex.dom.invoice.IncomingInvoice)9 BankAccount (org.estatio.module.financial.dom.BankAccount)7 LocalDate (org.joda.time.LocalDate)7 Action (org.apache.isis.applib.annotation.Action)6 Property (org.estatio.module.asset.dom.Property)5 BigDecimal (java.math.BigDecimal)4 ArrayList (java.util.ArrayList)4 Charge (org.estatio.module.charge.dom.Charge)4 Order (org.estatio.module.capex.dom.order.Order)3 Person (org.estatio.module.party.dom.Person)3 ActionLayout (org.apache.isis.applib.annotation.ActionLayout)2 BudgetItem (org.estatio.module.budget.dom.budgetitem.BudgetItem)2 IncomingInvoiceMenu (org.estatio.module.capex.app.IncomingInvoiceMenu)2 Project (org.estatio.module.capex.dom.project.Project)2 Country (org.incode.module.country.dom.impl.Country)2 MemberOrder (org.apache.isis.applib.annotation.MemberOrder)1