Esempio n. 1
0
        public void ExecuteRightTypeExceptionTest()
        {
            var exp = new DotProduct(
                new Vector(new[] { new Number(1), new Number(2), new Number(3) }),
                new Number(2));

            Assert.Throws <ResultIsNotSupportedException>(() => exp.Execute());
        }
Esempio n. 2
0
        public void ExecuteTest()
        {
            var exp = new DotProduct(
                new Vector(new[] { new Number(1), new Number(2), new Number(3) }),
                new Vector(new[] { new Number(4), new Number(5), new Number(6) })
                );
            var result = exp.Execute();

            Assert.Equal(32.0, result);
        }