Ejemplo n.º 1
0
        public void Identity_Dimension0_Exception()
        {
            int dimension = 0;

            Action act = () => Matrice2D.Identite(dimension);

            act.Should().Throw <ArgumentOutOfRangeException>();
        }
Ejemplo n.º 2
0
        public void Identity_Dimension1_MatriceIdentite1Ligne1Colonne()
        {
            Matrice2D attendue = new Matrice2D(new float[, ]
            {
                { 1 },
            });
            int dimension = 1;

            Matrice2D identite = Matrice2D.Identite(dimension);

            identite.Should().Be(attendue);
        }
Ejemplo n.º 3
0
        public void Identity_Dimension2_MatriceIdentite2Lignes2Colonnes()
        {
            Matrice2D attendue = new Matrice2D(new float[, ]
            {
                { 1, 0 },
                { 0, 1 },
            });
            int dimension = 2;

            Matrice2D identite = Matrice2D.Identite(dimension);

            identite.Should().Be(attendue);
        }