public void Static_PrepareGroups_InvalidElement_ShouldThrowArgumentException(string e) { Assert.Throws <ArgumentException>(() => { AuthTools.PrepareGroups(new string[] { e }); }); }
public void Static_PrepareGroups_NullGroups() { Assert.Throws <ArgumentNullException>(() => { AuthTools.PrepareGroups(null); }); }
public void Static_PrepareGroups() { Assert.AreEqual(0, AuthTools.PrepareGroups(new string[0]).Length, "Wrong result length"); string[] input = new string[] { "Group", "G.Group" }; string[] output = AuthTools.PrepareGroups(input); Assert.AreEqual(input.Length, output.Length, "Wrong result length"); for (int i = 0; i < input.Length; i++) { Assert.AreEqual("G." + input[i], output[i], "Wrong value"); } }
public void Static_PrepareGroups() { var groups = AuthTools.PrepareGroups(new string[0]).ToList(); Assert.AreEqual(0, groups.Count, "Wrong result length"); string[] input = { "Group", "G.Group" }; var output = AuthTools.PrepareGroups(input).ToList(); Assert.AreEqual(input.Length, output.Count, "Wrong result length"); for (var i = 0; i < input.Length; i++) { Assert.AreEqual("G." + input[i], output[i], "Wrong value"); } }
public void Static_PrepareGroups_InvalidElement(string e) { AuthTools.PrepareGroups(new[] { e }); }
public void Static_PrepareGroups_NullGroups() { AuthTools.PrepareGroups(null); }