示例#1
0
        public void SquaresOfASortedArrayTestCase2()
        {
            var input  = new[] { -7, -3, 2, 3, 11 };
            var output = SquaresOfASortedArray.SortedSquares(input);

            output.SequenceEqual(new [] { 4, 9, 9, 49, 121 }).Should().BeTrue();
        }
示例#2
0
        public void SquaresOfASortedArrayTestCase1()
        {
            var input  = new[] { -4, -1, 0, 3, 10 };
            var output = SquaresOfASortedArray.SortedSquares(input);

            output.SequenceEqual(new [] { 0, 1, 9, 16, 100 }).Should().BeTrue();
        }
 public void BeforeEach()
 {
     SquaresOfASortedArray = new SquaresOfASortedArray();
 }
    public void Works(int[] nums, int[] expected)
    {
        int[] result = new SquaresOfASortedArray().SolveSortedSquares(nums);

        result.Should().Equal(expected);
    }