public void should_multicast_delegate()
        {
            var demoObject = new MulticastDelegateDemoClass();

            Action theDelegate = demoObject.OneMethod;
            theDelegate += demoObject.AnotherMethod;

            theDelegate();

            // change variable value to fix test.
            var expectedTrace = new string[] {};

            Assert.Equal(expectedTrace, demoObject.Trace);
        }
        public void should_be_immutable_and_create_new_delegate_on_substraction_change()
        {
            var demoObject = new MulticastDelegateDemoClass();

            Action theDelegate = demoObject.OneMethod;
            Action copy = theDelegate;

            theDelegate += demoObject.AnotherMethod;

            // change variable value to fix test.
            const bool areReferenceEqual = true;

            Assert.Equal(areReferenceEqual, ReferenceEquals(theDelegate, copy));
        }