Пример #1
0
        public void GetLastWeight()
        {
            Mock <IWeighted> mockWeighted1 = new Mock <IWeighted>();

            mockWeighted1.SetupGet(m => m.Weight).Returns(1);
            Mock <IWeighted> mockWeighted2 = new Mock <IWeighted>();

            mockWeighted2.SetupGet(m => m.Weight).Returns(2);

            int nextWeight = U.GetNextWeight(new IWeighted[] { mockWeighted1.Object, mockWeighted2.Object });

            Assert.AreEqual(3, nextWeight);
        }