Skip to content

Commit

Permalink
test: customizable readme contents
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Jan 14, 2021
1 parent 3bb333e commit 1daf131
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package software.amazon.smithy.aws.typescript.codegen;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import software.amazon.smithy.build.MockManifest;
Expand Down Expand Up @@ -33,5 +36,12 @@ public void expandsPackageFixtureFiles() {
Assertions.assertTrue(manifest.hasFile(".gitignore"));
Assertions.assertTrue(manifest.hasFile(".npmignore"));
Assertions.assertTrue(manifest.hasFile("README.md"));

String readme = manifest.getFileString("README.md").get();
assertThat(readme, containsString("AWS SDK for JavaScript NotSame Client")); // Description
assertThat(readme, containsString("`NotSameClient`")); // Modular Client name
assertThat(readme, containsString("`GetFooCommand`")); // Command name
assertThat(readme, containsString("AWS.NotSame")); // v2 compatible client name
assertThat(readme, containsString("client.getFoo")); // v2 compatible operation name
}
}

0 comments on commit 1daf131

Please sign in to comment.