Beispiel #1
0
        public void ContainDuplicatesTestWithEmptyArray()
        {
            HasDuplicates HD     = new HasDuplicates();
            Action        action = () => HD.ContainDuplicates(new int[] {});

            action.ShouldThrow <ArgumentException>();
        }
Beispiel #2
0
        public void ContainDuplicatesTestWithNullInput()
        {
            HasDuplicates HD     = new HasDuplicates();
            Action        action = () => HD.ContainDuplicates(null);

            action.ShouldThrow <ArgumentException>();
        }
Beispiel #3
0
        public void ContainDuplicatesTestWithNoDuplicates()
        {
            HasDuplicates HD = new HasDuplicates();

            HD.ContainDuplicates(new int[] { 1, 2, 3, 4, 41, 42 }).Should().Be(false);
        }