public void DotProduct_Tuple_InvalidOuter() { var a = new Dimension(1, 2); var b = new Tuple <int, int>(2, 0); Assert.ThrowsException <ArgumentOutOfRangeException>(() => a.Dot(b)); }
public void DotProduct_Tuple_InvalidInner() { var a = new Dimension(1, 2); var b = new Tuple <int, int>(3, 4); Assert.ThrowsException <InvalidOperationException>(() => a.Dot(b)); }
public void DotProduct_Tuple_OK() { var a = new Dimension(1, 2); var b = new Tuple <int, int>(2, 3); var d = a.Dot(b); Assert.IsFalse(d.IsEmpty, "The dimension should not be empty."); Assert.AreEqual(1, d.Rows, "Invalid value for rows."); Assert.AreEqual(3, d.Columns, "Invalid value for columns."); }