Ejemplo n.º 1
0
        public void GetFactors_FactorizationOf825_ReturnCollection()
        {
            var expected = new List <int> {
                3, 5, 5, 11
            };

            var result = Factorization.GetFactorsOf(825);

            result.Should().BeEquivalentTo(expected);
        }
Ejemplo n.º 2
0
        public void GetFactors_FactorizationOf1386_ReturnCollection()
        {
            var expected = new List <int> {
                2, 3, 3, 7, 11
            };

            var result = Factorization.GetFactorsOf(1386);

            result.Should().BeEquivalentTo(expected);
        }
Ejemplo n.º 3
0
        public void GetFactors_FactorizationOfNegative_ReturnCollectionWith0()
        {
            var result = Factorization.GetFactorsOf(-1);

            result.Should().BeEquivalentTo(0);
        }