Esempio n. 1
0
    public void GetFirst_OneValueAppended_ReturnsThatValue(int value)
    {
        IMyList list = CreateSUT();

        list.Append(value);
        Assert.Equal(value, list.GetFirst());
    }
Esempio n. 2
0
        public int GetGoldenTarget(IMyList targetPoints)
        {
            if (targetPoints.Count < 2)
            {
                throw new ArgumentException("points.Count < 2", nameof(targetPoints));
            }

            return((targetPoints.GetFirst() + targetPoints.ElementAt(targetPoints.Count - 1)) / 2);
        }