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.6.12 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.11 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.10 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.9 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.8 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.7 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.6 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.5 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.4 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.3 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.2 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.1 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.6.0 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.18 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.17 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.16 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.15 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.14 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.13 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs
trackler-2.0.5.12 tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs