static void Main(string[] args) { CountdownTimer countdownTimer = new CountdownTimer(5); FirstTestClass first = new FirstTestClass("first"); SecondTestClass second = new SecondTestClass("second"); countdownTimer.TimeIsOver += first.WriteAMessage; countdownTimer.TimeIsOver += second.WriteAMessage; countdownTimer.StartCountdown("Time lapsed"); System.Console.ReadKey(); }
public void ObjectProperty() { var obj = new TestClass(); var obj2 = new SecondTestClass(); obj.ObjProp = obj2; Assert.AreEqual($"{{\"{nameof(obj.ObjProp)}\":{{\"{nameof(obj2.SecNumProp)}\":{obj2.SecNumProp}}}}}", Morpher.Describe(obj, o => Morpher.Morph(o.ObjProp, o2 => o2.SecNumProp ) )); }