Sha256: 96ce2af87c4d416b514791b31f24c093a40beb567b8edab0a4a2505406a587ab

Contents?: true

Size: 1.42 KB

Versions: 115

Compression:

Stored size: 1.42 KB

Contents

using NUnit.Framework;

[TestFixture]
public class RaindropsTest
{
    [TestCase(1, ExpectedResult = "1")]
    [TestCase(52, ExpectedResult = "52")]
    [TestCase(12121, ExpectedResult = "12121")]
    public string Non_primes_pass_through(int number)
    {
        return Raindrops.Convert(number);
    }

    [Ignore("Remove to run test")]
    [TestCase(3)]
    [TestCase(6)]
    [TestCase(9)]
    public void Numbers_containing_3_as_a_prime_factor_give_pling(int number)
    {
        Assert.That(Raindrops.Convert(number), Is.EqualTo("Pling"));
    }

    [Ignore("Remove to run test")]
    [TestCase(5)]
    [TestCase(10)]
    [TestCase(25)]
    public void Numbers_containing_5_as_a_prime_factor_give_plang(int number)
    {
        Assert.That(Raindrops.Convert(number), Is.EqualTo("Plang"));
    }

    [Ignore("Remove to run test")]
    [TestCase(7)]
    [TestCase(14)]
    [TestCase(49)]
    public void Numbers_containing_7_as_a_prime_factor_give_plong(int number)
    {
        Assert.That(Raindrops.Convert(number), Is.EqualTo("Plong"));
    }

    [Ignore("Remove to run test")]
    [TestCase(15, ExpectedResult = "PlingPlang")]
    [TestCase(21, ExpectedResult = "PlingPlong")]
    [TestCase(35, ExpectedResult = "PlangPlong")]
    [TestCase(105, ExpectedResult = "PlingPlangPlong")]
    public string Numbers_containing_multiple_prime_factors_give_all_results_concatenated(int number)
    {
        return Raindrops.Convert(number);
    }
}

Version data entries

115 entries across 115 versions & 1 rubygems

Version Path
trackler-2.0.8.14 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.13 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.12 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.11 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.10 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.9 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.8 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.7 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.6 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.5 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.4 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.3 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.2 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.8.1 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.7.0 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.6.44 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.6.43 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.6.42 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.6.41 tracks/csharp/exercises/raindrops/RaindropsTest.cs
trackler-2.0.6.40 tracks/csharp/exercises/raindrops/RaindropsTest.cs