Exemplo n.º 1
0
    public void ShouldSortReversedOrder()

    {
        int[] array = new int[] { 8, 7, 6, 5, 4, 3, 2, 1 };



        var bubble = new BubbleSort1(array);

        bubble.Sort();



        Assert.That(bubble.Array, Is.EqualTo(expected));
    }
Exemplo n.º 2
0
    public void ShouldSortIncreasingOrder()

    {
        int[] array = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 };



        var bubble = new BubbleSort1(array);

        bubble.Sort();



        Assert.That(bubble.Array, Is.EqualTo(expected));
    }
Exemplo n.º 3
0
    public void ShouldSortDefaultOrder()

    {
        int[] array = new int[] { 1, 8, 5, 4, 3, 2, 7, 6 };



        var bubble = new BubbleSort1(array);

        bubble.Sort();



        Assert.That(bubble.Array, Is.EqualTo(expected));
    }