Sha256: 2584be820f1ffb4f188d5bcc1ecd5deaac12c6780f103a6377b20c318278150a

Contents?: true

Size: 1.6 KB

Versions: 28

Compression:

Stored size: 1.6 KB

Contents

// This file was auto-generated based on version 1.1.0 of the canonical data.

using Xunit;

public class SpiralMatrixTest
{
    [Fact]
    public void Empty_spiral()
    {
        Assert.Empty(SpiralMatrix.GetMatrix(0));
    }

    [Fact(Skip = "Remove to run test")]
    public void Trivial_spiral()
    {
        var expected = new[,]
        {
            { 1 }
        };
        Assert.Equal(expected, SpiralMatrix.GetMatrix(1));
    }

    [Fact(Skip = "Remove to run test")]
    public void Spiral_of_size_2()
    {
        var expected = new[,]
        {
            { 1, 2 },
            { 4, 3 }
        };
        Assert.Equal(expected, SpiralMatrix.GetMatrix(2));
    }

    [Fact(Skip = "Remove to run test")]
    public void Spiral_of_size_3()
    {
        var expected = new[,]
        {
            { 1, 2, 3 },
            { 8, 9, 4 },
            { 7, 6, 5 }
        };
        Assert.Equal(expected, SpiralMatrix.GetMatrix(3));
    }

    [Fact(Skip = "Remove to run test")]
    public void Spiral_of_size_4()
    {
        var expected = new[,]
        {
            { 1, 2, 3, 4 },
            { 12, 13, 14, 5 },
            { 11, 16, 15, 6 },
            { 10, 9, 8, 7 }
        };
        Assert.Equal(expected, SpiralMatrix.GetMatrix(4));
    }

    [Fact(Skip = "Remove to run test")]
    public void Spiral_of_size_5()
    {
        var expected = new[,]
        {
            { 1, 2, 3, 4, 5 },
            { 16, 17, 18, 19, 6 },
            { 15, 24, 25, 20, 7 },
            { 14, 23, 22, 21, 8 },
            { 13, 12, 11, 10, 9 }
        };
        Assert.Equal(expected, SpiralMatrix.GetMatrix(5));
    }
}

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.179 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.178 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.177 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.176 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.175 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.174 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.173 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.172 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.171 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.170 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.169 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.167 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.166 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.165 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.164 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.163 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.162 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.161 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs
trackler-2.2.1.160 tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs