diff --git a/Managing-RBAC-in-Azure.Tests/UpdatePoliciesFromYamlTest.cs b/Managing-RBAC-in-Azure.Tests/UpdatePoliciesFromYamlTest.cs
index f21e9be..e3ec712 100644
--- a/Managing-RBAC-in-Azure.Tests/UpdatePoliciesFromYamlTest.cs
+++ b/Managing-RBAC-in-Azure.Tests/UpdatePoliciesFromYamlTest.cs
@@ -33,6 +33,31 @@ namespace RBAC
}
}
+ [TestMethod]
+ ///
+ /// This method verifies that valid file extensions work.
+ ///
+ public void TestVerifyFileExtensionsValid()
+ {
+ UpdatePoliciesFromYaml up = new UpdatePoliciesFromYaml(true);
+
+ List> testCasesValid = new List>()
+ {
+ new Testing (new string[] { "file.json", "file.yml", "../../../output", "log4net.config" })
+ };
+ foreach (Testing testCase in testCasesValid)
+ {
+ try
+ {
+ up.verifyFileExtensions(testCase.testObject);
+ }
+ catch
+ {
+ Assert.Fail();
+ }
+ }
+ }
+
[TestMethod]
///
/// This method verifies that invalid file extensions are handled.
@@ -46,6 +71,7 @@ namespace RBAC
new Testing (new string[] {}, "Missing 4 input files."),
new Testing (new string[] { "file.json" }, "Missing 3 input files."),
new Testing (new string[] { "file.json", "file.yml" }, "Missing 2 input files."),
+ new Testing (new string[] { "file.json", "file.yml", "../../../output" }, "Missing 1 input file."),
new Testing (new string[] { "file1.json", "file2.json", "../../../output", "file3.json", "file4.json" }, "Too many input files. Maximum needed is 4."),
new Testing (new string[] { "file.jsn", "file.yml", "../../../output", "log4net.config" }, "The 1st argument is not a .json file."),
new Testing (new string[] { "file.json", "file.yaml", "../../../output", "log4net.config" }, "The 2nd argument is not a .yml file."),