Sha256: c74190c47cbd446852c32303817cbe8307b59249115621b2f874d2daca7017a3

Contents?: true

Size: 1.02 KB

Versions: 138

Compression:

Stored size: 1.02 KB

Contents

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

using Xunit;
using System;

public class CollatzConjectureTest
{
    [Fact]
    public void Zero_steps_for_one()
    {
        Assert.Equal(0, CollatzConjecture.Steps(1));
    }

    [Fact(Skip = "Remove to run test")]
    public void Divide_if_even()
    {
        Assert.Equal(4, CollatzConjecture.Steps(16));
    }

    [Fact(Skip = "Remove to run test")]
    public void Even_and_odd_steps()
    {
        Assert.Equal(9, CollatzConjecture.Steps(12));
    }

    [Fact(Skip = "Remove to run test")]
    public void Large_number_of_even_and_odd_steps()
    {
        Assert.Equal(152, CollatzConjecture.Steps(1000000));
    }

    [Fact(Skip = "Remove to run test")]
    public void Zero_is_an_error()
    {
        Assert.Throws<ArgumentException>(() => CollatzConjecture.Steps(0));
    }

    [Fact(Skip = "Remove to run test")]
    public void Negative_value_is_an_error()
    {
        Assert.Throws<ArgumentException>(() => CollatzConjecture.Steps(-15));
    }
}

Version data entries

138 entries across 138 versions & 1 rubygems

Version Path
trackler-2.2.1.151 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.150 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.149 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.148 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.147 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.146 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.145 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.144 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.143 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.142 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.141 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.140 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.139 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.138 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.137 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.136 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.135 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.134 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.133 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.132 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs