public void GetData(TaskNum task) { task.numbers.Add(new RationalNumber(7, 1)); task.numbers.Add(new RationalNumber(8, 1)); task.numbers.Add(new RationalNumber(9, 1)); task.numbers.Add(new RationalNumber(7, 8)); task.numbers.Add(new RationalNumber(9, 10)); }
public void CloneTestMethod() { TaskNum task = new TaskNum(); GetData(task); TaskNum cloneTask = task.Clone() as TaskNum; Assert.AreEqual(task.numbers.Count, cloneTask.numbers.Count); }
public void DobutokTestMethod() { TaskNum task = new TaskNum(); GetData(task); RationalNumber res = task.Dobutok() as RationalNumber; RationalNumber expetedRes = new RationalNumber(3969, 10); Assert.IsTrue(expetedRes.denominator == res.denominator && res.numerator == expetedRes.numerator); }
public void AverageTestMethod() { TaskNum task = new TaskNum(); GetData(task); RationalNumber res = task.Average() as RationalNumber; RationalNumber expetedRes = new RationalNumber(1031, 200); Assert.IsTrue(expetedRes.denominator == res.denominator && res.numerator == expetedRes.numerator); }
private void SetTask() { lblTask.Text = "Task " + TaskNum.ToString() + "/" + TaskCount.ToString() + ": " + TaskName + "..."; Refresh(); }