public void NewElement_IncorrectParams_TrowsExeption() { int[,] arr1 = { { 1, 2 }, { 2, 4 } }; SymmetricMatrix <int> m1 = new SymmetricMatrix <int>(arr1); m1.NewElement(10, 10, 88); }
public void CreatingMatrix_IndexatorWork_ChangingElement_CorrectParams_ExpectedResult() { int[,] arr = { { 1, 2 }, { 2, 4 } }; SymmetricMatrix <int> s = new SymmetricMatrix <int>(arr); s.NewElement(1, 1, 10); int expected = 10; int actual = s[1, 1]; Assert.AreEqual(expected, actual); }
public void EventWork_CorrectParams_ExpectedResult() { int[,] arr1 = { { 1, 2 }, { 2, 4 } }; SymmetricMatrix <int> m1 = new SymmetricMatrix <int>(arr1); m1.MatrixElementChanged += TestMethod; bool expected = true; m1.NewElement(1, 1, 10); bool actual = test; Assert.AreEqual(expected, actual); }