mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +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,7 @@
|
|||
|
||||
package google.registry.module.frontend;
|
||||
|
||||
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 +26,8 @@ public class FrontendRequestComponentTest {
|
|||
|
||||
@Test
|
||||
public void testRoutingMap() throws Exception {
|
||||
GoldenFileTestHelper.testGoldenFile(
|
||||
RouterDisplayHelper.extractHumanReadableRoutesFromComponent(FrontendRequestComponent.class),
|
||||
getResource(FrontendRequestComponentTest.class, "testdata/frontend_routing.txt"),
|
||||
"frontend routing map",
|
||||
"get_routing_map -c " + FrontendRequestComponent.class.getName());
|
||||
GoldenFileTestHelper.assertThatRoutesFromComponent(FrontendRequestComponent.class)
|
||||
.describedAs("frontend routing map")
|
||||
.isEqualToGolden(FrontendRequestComponentTest.class, "frontend_routing.txt");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue