public void GetPairsCount_Case2() { // Assign var count = 4; var keys = new[] { "bdfhj", "gacie", "bdf", "aec" }; var expected = 2; var sigkey = new Sigkey(); // Act var result = sigkey.GetPairsCount(count, keys); // Assert Assert.AreEqual(expected, result); }
public void GetPairsCount_Case1() { // Assign var count = 4; var keys = new[] { "acdf", "bcde", "be", "f" }; var expected = 1; var sigkey = new Sigkey(); // Act var result = sigkey.GetPairsCount(count, keys); // Assert Assert.AreEqual(expected, result); }
public void GetPairsCount_Case4() { // Assign var count = 26; var keys = new[] { "e", "m", "t", "i", "b", "l", "y", "p", "c", "o", "v", "j", "h", "k", "x", "r", "u", "a", "g", "w", "z", "q", "f", "s", "n", "d" }; var expected = 1; var sigkey = new Sigkey(); // Act var result = sigkey.GetPairsCount(count, keys); // Assert Assert.AreEqual(expected, result); }
public void GetPairsCount_Case3() { // Assign var count = 6; var keys = new[] { "abcdefghijklm", "nopqrstuvwxyz", "cba", "fed", "zyxwvutsr", "qponabcdefghijklm" }; var expected = 3; var sigkey = new Sigkey(); // Act var result = sigkey.GetPairsCount(count, keys); // Assert Assert.AreEqual(expected, result); }
private static void Main(string[] args) { var sigkey = new Sigkey(); string inputFileName; string outputFileName; if (args == null || args.Length == 0) { inputFileName = "sigkey.in"; outputFileName = "sigkey.out"; } else if (args.Length == 2) { inputFileName = args[0]; outputFileName = args[1]; } else { Console.WriteLine("Command line parameters violation!"); return; } sigkey.Run(inputFileName, outputFileName); }
private static void Main(string[] args) { var sigkey = new Sigkey(); string inputFileName; string outputFileName; if (args == null || args.Length == 0) { inputFileName = "sigkey.in"; outputFileName = "sigkey.out"; } else if (args.Length == 2) { inputFileName = args[0]; outputFileName = args[1]; } else { Console.WriteLine("Command line parameters violation!"); return; } sigkey.Run(inputFileName, outputFileName); }