Sha256: 5f63bb1593e462e6f12d4c605af65cd0043107bd9ab6ba0be9ba764053c2a719

Contents?: true

Size: 2 KB

Versions: 63

Compression:

Stored size: 2 KB

Contents

using System;
using NUnit.Framework;

[TestFixture]
public class DifferenceOfSquaresTests
{
    [Test]
    public void Test_square_of_sums_to_5()
    {
        Assert.That(new Squares(5).SquareOfSums(), Is.EqualTo(225));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Test_sum_of_squares_to_5()
    {
        Assert.That(new Squares(5).SumOfSquares(), Is.EqualTo(55));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Test_difference_of_sums_to_5()
    {
        Assert.That(new Squares(5).DifferenceOfSquares(), Is.EqualTo(170));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Test_square_of_sums_to_10()
    {
        Assert.That(new Squares(10).SquareOfSums(), Is.EqualTo(3025));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Test_sum_of_squares_to_10()
    {
        Assert.That(new Squares(10).SumOfSquares(), Is.EqualTo(385));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Test_difference_of_sums_to_10()
    {
        Assert.That(new Squares(10).DifferenceOfSquares(), Is.EqualTo(2640));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Test_square_of_sums_to_100()
    {
        Assert.That(new Squares(100).SquareOfSums(), Is.EqualTo(25502500));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Test_sum_of_squares_to_100()
    {
        Assert.That(new Squares(100).SumOfSquares(), Is.EqualTo(338350));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Test_difference_of_sums_to_100()
    {
        Assert.That(new Squares(100).DifferenceOfSquares(), Is.EqualTo(25164150));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Test_difference_of_sums_0()
    {
        Assert.That(new Squares(0).DifferenceOfSquares(), Is.EqualTo(0));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Test_negative_numbers_throw_argument_exception()
    {
        Assert.That(() => new Squares(-5), Throws.TypeOf<ArgumentException>());
    }
}

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
trackler-2.0.6.7 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.6.6 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.6.5 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.6.4 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.6.3 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.6.2 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.6.1 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.6.0 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.18 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.17 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.16 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.15 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.14 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.13 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.12 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.11 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.10 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.9 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.8 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
trackler-2.0.5.7 tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs