Exemple #1
0
        public void calculateTestEmptystringArray()
        {
            LastValue value = new LastValue();

            string[] values = new string[10];
            Assert.AreEqual(0, value.calculate(values, 2));
        }
Exemple #2
0
        public void calculateTestEmptyList()
        {
            LastValue     value       = new LastValue();
            List <double> list_values = new List <double>();

            Assert.AreEqual(0, value.calculate(list_values));
        }
Exemple #3
0
        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));
        }
Exemple #4
0
        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));
        }
Exemple #5
0
        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));
        }
Exemple #6
0
        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));
        }