Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added unittest to check for specific repo files #609

Merged
merged 5 commits into from
Nov 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions tests/SendGrid.Tests/RequiredFilesExistTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
namespace SendGrid.Tests
{
using System.IO;
using Xunit;

public class TestRequiredFilesExist
{

// ./Docker or docker/Docker
public void checkDockerExists() {
bool dockerExists = File.Exists("./Dockerfile") ||
File.Exists("./docker/Dockerfile");
Assert.True(dockerExists);
}

// ./docker-compose.yml or ./docker/docker-compose.yml
public void checkDockerComposeExists()
{
bool dockerComposeExists = File.Exists("./docker-compose.yml") ||
File.Exists("./docker/docker-compose.yml");
Assert.True(dockerComposeExists);
}

// ./.env_sample
public void checkEnvSampleExists()
{
Assert.True(File.Exists("./.env_sample"));
}

// ./.gitignore
public void checkGitIgnoreExists()
{
Assert.True(File.Exists("./.gitignore"));
}

// ./.travis.yml
public void checkTravisExists()
{
Assert.True(File.Exists("./.travis.yml"));
}

// ./.codeclimate.yml
public void checkCodeClimateExists()
{
Assert.True(File.Exists("./.codeclimate.yml"));
}

// ./CHANGELOG.md
public void checkChangelogExists()
{
Assert.True(File.Exists("./CHANGELOG.md"));
}

// ./CODE_OF_CONDUCT.md
public void checkCodeOfConductExists()
{
Assert.True(File.Exists("./CODE_OF_CONDUCT.md"));
}

// ./CONTRIBUTING.md
public void checkContributingGuideExists()
{
Assert.True(File.Exists("./CONTRIBUTING.md"));
}

// ./.github/ISSUE_TEMPLATE
public void checkIssuesTemplateExists()
{
Assert.True(File.Exists("./.github/ISSUE_TEMPLATE"));
}

// ./LICENSE.md
public void checkLicenseExists()
{
bool licenseExists = File.Exists("./LICENSE.md") ||
File.Exists("./LICENSE.txt");
Assert.True(licenseExists);
}

// ./.github/PULL_REQUEST_TEMPLATE
public void checkPullRequestExists()
{
Assert.True(File.Exists("./.github/PULL_REQUEST_TEMPLATE"));
}

// ./README.md
public void checkReadMeExists()
{
Assert.True(File.Exists("./README.md"));
}

// ./TROUBLESHOOTING.md
public void checkTroubleShootingGuideExists()
{
Assert.True(File.Exists("./TROUBLESHOOTING.md"));
}

// ./USAGE.md
public void checkUsageGuideExists()
{
Assert.True(File.Exists("./USAGE.md"));
}

// ./USE_CASES.md
public void checkUseCases()
{
Assert.True(File.Exists("./USE_CASES.md"));
}
}
}