public void ModOpTest() { Node op = NodeFac.Create('%'); double actual = ((OpNode)op).Calculate(3, 2); double expected = 1; Assert.Equal(actual, expected); }
public void NullOpTest() { Node op = NodeFac.Create('a'); double actual = ((OpNode)op).Calculate(6, 2); double expected = 0; Assert.Equal(actual, expected); }
public void DivideTest() { Node op = NodeFac.Create('/'); double actual = ((OpNode)op).Calculate(6, 2); double expected = 3; Assert.Equal(actual, expected); }
public void MultiplyTest() { Node op = NodeFac.Create('*'); double actual = ((OpNode)op).Calculate(4, 2); double expected = 8; Assert.Equal(actual, expected); }
public void SubtractTest() { Node op = NodeFac.Create('-'); double actual = ((OpNode)op).Calculate(4, 2); double expected = 2; Assert.Equal(actual, expected); }
public void AddTest() { Node op = NodeFac.Create('+'); double actual = ((OpNode)op).Calculate(4, 2); double expected = 6; Assert.Equal(actual, expected); }