mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +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.tools;
|
||||
|
||||
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 ToolsRequestComponentTest {
|
|||
|
||||
@Test
|
||||
public void testRoutingMap() throws Exception {
|
||||
GoldenFileTestHelper.testGoldenFile(
|
||||
RouterDisplayHelper.extractHumanReadableRoutesFromComponent(ToolsRequestComponent.class),
|
||||
getResource(ToolsRequestComponentTest.class, "testdata/tools_routing.txt"),
|
||||
"tools routing map",
|
||||
"get_routing_map -c " + ToolsRequestComponent.class.getName());
|
||||
GoldenFileTestHelper.assertThatRoutesFromComponent(ToolsRequestComponent.class)
|
||||
.describedAs("tools routing map")
|
||||
.isEqualToGolden(ToolsRequestComponentTest.class, "tools_routing.txt");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue