Beispiel #1
0
        WHEN_no_listener_THEN_it_should_not_fail()
        {
            var bus = new Sample3();

            Check
            .ThatCode(() => bus.SaySomething("hello"))
            .DoesNotThrow();
        }
Beispiel #2
0
        WHEN_listener_THEN_it_should_get_the_message()
        {
            var    bus     = new Sample3();
            string message = null;

            bus.onNewMessage += m => message = m;
            Check
            .ThatCode(() => bus.SaySomething("hello"))
            .DoesNotThrow();

            Check.That(
                message)
            .IsNotNull()
            .And.IsEqualTo("hello");
        }