Sha256: 5878b1f57c348a394891413f1d44e388ec41d561a645d163ec83c16bbafc3df1

Contents?: true

Size: 1021 Bytes

Versions: 68

Compression:

Stored size: 1021 Bytes

Contents

using NUnit.Framework;

[TestFixture]
public class SumOfMultiplesTest
{
    [Test]
    public void Sum_to_1()
    {
        Assert.That(SumOfMultiples.To(new[] { 3, 5 }, 1), Is.EqualTo(0));
    }
    
    [Test]
    public void Sum_to_3()
    {
        Assert.That(SumOfMultiples.To(new[] { 3, 5 }, 4), Is.EqualTo(3));
    }
    
    [Test]
    public void Sum_to_10()
    {
        Assert.That(SumOfMultiples.To(new[] { 3, 5 }, 10), Is.EqualTo(23));
    }
    
    [Test]
    public void Sum_to_100()
    {
       Assert.That(SumOfMultiples.To(new[] { 3, 5 }, 100), Is.EqualTo(2318));
    }
    
    [Test]
    public void Sum_to_1000()
    {
        Assert.That(SumOfMultiples.To(new[] { 3, 5 }, 1000), Is.EqualTo(233168));
    }
    
    [Test]
    public void Sum_to_20()
    {
        Assert.That(SumOfMultiples.To(new [] { 7, 13, 17 }, 20), Is.EqualTo(51));
    }
    
    [Test]
    public void Sum_to_10000()
    {
        Assert.That(SumOfMultiples.To(new [] { 43, 47 }, 10000), Is.EqualTo(2203160));
    }
}

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
trackler-2.0.5.11 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.10 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.9 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.8 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.7 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.6 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.5 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.4 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.3 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.2 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.1 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.0 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.4.0 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.3.9 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.3.8 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.3.7 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.3.6 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.3.5 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.3.4 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.3.3 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs