Exemplo n.º 1
0
        public void FilterByKey_WithEmptyArray_ArgumentException()
        {
            TemplateMethodByKey temp = new TemplateMethodByKey();

            Assert.Throws <ArgumentException>(() => temp.FilterByKey(new int[0]),
                                              message: "Array cannot be empty!");
        }
Exemplo n.º 2
0
        public void FilterByKey_WithNullArray_ArgumentNullException()
        {
            TemplateMethodByKey temp = new TemplateMethodByKey();

            Assert.Throws <ArgumentNullException>(() => temp.FilterByKey(null),
                                                  message: "Array cannot be null");
        }
Exemplo n.º 3
0
        public void FilterByKey_WithPossitivePowers_ExpectedResults(int[] array, int digit, int[] expected)
        {
            TemplateMethodByKey temp = new TemplateMethodByKey(digit);

            Assert.AreEqual(expected, temp.FilterByKey(array));
        }