Sha256: 7db2b4889c521d9038f8831a58890292e3a17143dba2bc4d3921fea7435f6e40

Contents?: true

Size: 1.17 KB

Versions: 138

Compression:

Stored size: 1.17 KB

Contents

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

using Xunit;

public class PrimeFactorsTest
{
    [Fact]
    public void No_factors()
    {
        Assert.Empty(PrimeFactors.Factors(1));
    }

    [Fact(Skip = "Remove to run test")]
    public void Prime_number()
    {
        Assert.Equal(new[] { 2 }, PrimeFactors.Factors(2));
    }

    [Fact(Skip = "Remove to run test")]
    public void Square_of_a_prime()
    {
        Assert.Equal(new[] { 3, 3 }, PrimeFactors.Factors(9));
    }

    [Fact(Skip = "Remove to run test")]
    public void Cube_of_a_prime()
    {
        Assert.Equal(new[] { 2, 2, 2 }, PrimeFactors.Factors(8));
    }

    [Fact(Skip = "Remove to run test")]
    public void Product_of_primes_and_non_primes()
    {
        Assert.Equal(new[] { 2, 2, 3 }, PrimeFactors.Factors(12));
    }

    [Fact(Skip = "Remove to run test")]
    public void Product_of_primes()
    {
        Assert.Equal(new[] { 5, 17, 23, 461 }, PrimeFactors.Factors(901255));
    }

    [Fact(Skip = "Remove to run test")]
    public void Factors_include_a_large_prime()
    {
        Assert.Equal(new[] { 11, 9539, 894119 }, PrimeFactors.Factors(93819012551));
    }
}

Version data entries

138 entries across 138 versions & 1 rubygems

Version Path
trackler-2.2.1.30 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.29 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.28 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.27 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.26 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.25 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.24 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.23 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.22 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.21 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.20 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.19 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.18 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.17 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.16 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.15 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.14 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs
trackler-2.2.1.13 tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs