Merge branch 'test' of http://8.163.30.128:10082/java-project/baiyue-firstleg into test
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
package com.baiyue.warehouse.controller;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class InternalWarehousePalletLabelContractTest {
|
||||
@Test
|
||||
void labelEndpointIsInternalAndRequiresTheServiceToken() throws Exception {
|
||||
var method = InternalWarehousePalletController.class.getMethod("label",
|
||||
String.class, String.class, long.class, long.class, String.class);
|
||||
|
||||
assertThat(method.getAnnotation(GetMapping.class).value())
|
||||
.containsExactly("/{warehouseId}/{palletId}/label");
|
||||
assertThat(method.getParameters()[0].getAnnotation(RequestHeader.class).value())
|
||||
.isEqualTo("X-Internal-Service-Token");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user