-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from mercyblitz/dev-1.x
Add test-cases
- Loading branch information
Showing
15 changed files
with
292 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...vice/registry/actuate/autoconfigure/ServiceRegistrationEndpointAutoConfigurationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package io.microsphere.spring.cloud.client.service.registry.actuate.autoconfigure; | ||
|
||
import io.microsphere.spring.cloud.client.service.registry.endpoint.ServiceDeregistrationEndpoint; | ||
import io.microsphere.spring.cloud.client.service.registry.endpoint.ServiceRegistrationEndpoint; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.ObjectProvider; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
/** | ||
* {@link ServiceRegistrationEndpointAutoConfiguration} Test | ||
* | ||
* @author <a href="mailto:[email protected]">Mercy<a/> | ||
* @see ServiceRegistrationEndpointAutoConfiguration | ||
* @since 1.0.0 | ||
*/ | ||
@SpringBootTest( | ||
classes = { | ||
ServiceRegistrationEndpointAutoConfigurationTest.class | ||
}, | ||
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, | ||
properties = { | ||
"microsphere.spring.cloud.service-registry.auto-registration.simple.enabled=true", | ||
"management.endpoint.serviceRegistration.enabled=true", | ||
"management.endpoint.serviceDeregistration.enabled=true", | ||
} | ||
) | ||
@EnableAutoConfiguration | ||
public class ServiceRegistrationEndpointAutoConfigurationTest { | ||
|
||
@Autowired | ||
private ObjectProvider<ServiceRegistrationEndpoint> serviceRegistrationEndpoint; | ||
|
||
@Autowired | ||
private ObjectProvider<ServiceDeregistrationEndpoint> serviceDeregistrationEndpoint; | ||
|
||
@Test | ||
public void testEndpoints() { | ||
assertNotNull(serviceRegistrationEndpoint); | ||
} | ||
|
||
} |
Oops, something went wrong.