Skip to content

Commit

Permalink
! fix UT fail of archetype:generate project by cola-framework-archety…
Browse files Browse the repository at this point in the history
…pe-web
  • Loading branch information
oldratlee committed Jan 4, 2021
1 parent bde5759 commit 5fbe020
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
package ${package}.test;

import com.alibaba.cola.dto.Response;
import com.alibaba.cola.exception.BizException;
import ${package}.api.CustomerServiceI;
import ${package}.dto.CustomerAddCmd;
import ${package}.dto.data.CustomerDTO;
import ${package}.dto.data.ErrorCode;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
Expand Down Expand Up @@ -49,7 +49,7 @@ public void testCustomerAddSuccess(){
Assert.assertTrue(response.isSuccess());
}

@Test(expected = BizException.class)
@Test
public void testCustomerAddCompanyNameConflict(){
//1.prepare
CustomerAddCmd customerAddCmd = new CustomerAddCmd();
Expand All @@ -60,8 +60,7 @@ public void testCustomerAddCompanyNameConflict(){
//2.execute
Response response = customerService.addCustomer(customerAddCmd);

//3.Exception
//Assert.assertEquals(ErrorCode.B_CUSTOMER_companyNameConflict.getErrCode(), response.getErrCode());

//3.assert error
Assert.assertEquals(ErrorCode.B_CUSTOMER_companyNameConflict.getErrCode(), response.getErrCode());
}
}

0 comments on commit 5fbe020

Please sign in to comment.