mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Move all testdata reads to use TestDataHelper, and made tests more fluent
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192204510
This commit is contained in:
parent
a8b6195ce2
commit
24498ff97b
7 changed files with 56 additions and 58 deletions
|
@ -14,9 +14,6 @@
|
|||
|
||||
package google.registry.module.backend;
|
||||
|
||||
import static com.google.common.io.Resources.getResource;
|
||||
|
||||
import google.registry.request.RouterDisplayHelper;
|
||||
import google.registry.testing.GoldenFileTestHelper;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
@ -28,10 +25,8 @@ public class BackendRequestComponentTest {
|
|||
|
||||
@Test
|
||||
public void testRoutingMap() throws Exception {
|
||||
GoldenFileTestHelper.testGoldenFile(
|
||||
RouterDisplayHelper.extractHumanReadableRoutesFromComponent(BackendRequestComponent.class),
|
||||
getResource(BackendRequestComponentTest.class, "testdata/backend_routing.txt"),
|
||||
"backend routing map",
|
||||
"get_routing_map -c " + BackendRequestComponent.class.getName());
|
||||
GoldenFileTestHelper.assertThatRoutesFromComponent(BackendRequestComponent.class)
|
||||
.describedAs("backend routing map")
|
||||
.isEqualToGolden(BackendRequestComponentTest.class, "backend_routing.txt");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue