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:
guyben 2018-04-09 16:11:14 -07:00 committed by Ben McIlwain
parent a8b6195ce2
commit 24498ff97b
7 changed files with 56 additions and 58 deletions

View file

@ -14,8 +14,6 @@
package google.registry.model;
import static com.google.common.io.Resources.getResource;
import google.registry.testing.AppEngineRule;
import google.registry.testing.GoldenFileTestHelper;
import org.junit.Rule;
@ -36,10 +34,9 @@ public class SchemaVersionTest {
@Test
public void testGoldenSchemaFile() throws Exception {
GoldenFileTestHelper.testGoldenFile(
SchemaVersion.getSchema(),
getResource(SchemaVersionTest.class, "schema.txt"),
"Datastore schema",
"get_schema");
GoldenFileTestHelper.assertThat(SchemaVersion.getSchema())
.describedAs("Datastore schema")
.createdByNomulusCommand("get_schema")
.isEqualToGolden(SchemaVersionTest.class, "schema.txt");
}
}