Sha256: 4f110aa191baad22ff2e7dbd3d606953f65fdc90b4fdf38c948f8f70432d2fe9

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

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

using System;
using Xunit;

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

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

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

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trackler-2.2.1.12 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs
trackler-2.2.1.11 tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs