public void calculateTestEmptystringArray() { LastValue value = new LastValue(); string[] values = new string[10]; Assert.AreEqual(0, value.calculate(values, 2)); }
public void calculateTestEmptyList() { LastValue value = new LastValue(); List <double> list_values = new List <double>(); Assert.AreEqual(0, value.calculate(list_values)); }
public void calculateTestWithValuesinStringArrayWithPosOutOfRange() { LastValue value = new LastValue(); string[] values = new string[2]; values[0] = "sceneId"; values[1] = "10.2"; Assert.AreEqual(10.2, value.calculate(values, 3)); }
public void calculateTestWithValuesinStringArrayWithNegativePos() { LastValue value = new LastValue(); string[] values = new string[2]; values[0] = "sceneId"; values[1] = "10.2"; Assert.AreEqual(0, value.calculate(values, -1)); }
public void calculateTestWithCorrectValuesinStringArray() { LastValue value = new LastValue(); string[] values = new string[3]; values[0] = "sceneId"; values[1] = "10.2"; values[2] = "20.2"; Assert.AreEqual(20.2, value.calculate(values, 1)); }
public void calculateTestWithValuesinList() { LastValue value = new LastValue(); List <double> list_values = new List <double>(); list_values.Add(10.2); list_values.Add(20.2); list_values.Add(30.2); Assert.AreEqual(30.2, value.calculate(list_values)); }