public void Test_disjunction() { BoolVector expectedResult = new BoolVector(new List <int>() { 1, 1, 1, 0 }); BoolVector actualResult = BoolVectorAction.Disjunction(boolVectors); Assert.IsTrue(expectedResult.Components.SequenceEqual(actualResult.Components)); }
public void Test_negation() { BoolVector expectedResult = new BoolVector(new List <int>() { 0, 0, 0, 1 }); BoolVector actualResult = BoolVectorAction.VectorNegation(boolVectors[4]); Assert.IsTrue(expectedResult.Components.SequenceEqual(actualResult.Components)); }
public void Test_disjunctionNegative() { try { boolVectors.Add(new BoolVector(new List <int>() { 0, 1, 1, 0, 1 })); BoolVector actualResult = BoolVectorAction.Disjunction(boolVectors); } catch (ArgumentException ex) { Assert.AreEqual("All bool vectors must be the same size", ex.Message); } catch (Exception ex) { // not the right kind of exception Assert.Fail(); } }