Пример #1
0
        public void Repetition_WhenSet_RaisesPropertyChanged()
        {
            IRepetition newRepetition = ARepetition.Build();
            var         test          = new Action();

            test.AssertThatChangeNotificationIsRaisedBy(x => x.Repetition).
            When(() => test.Repetition = newRepetition);
            Assert.Same(newRepetition, test.Repetition);
        }
Пример #2
0
 /// <summary>Get the component at the specified index.</summary>
 /// <param name="ancestor">Ancestor element.</param>
 /// <param name="index">Index of the descendant.</param>
 /// <returns>Descendant element.</returns>
 public static IComponent Component(this IRepetition ancestor, int index)
 {
     return(ancestor[index] as IComponent);
 }