Esempio n. 1
0
        public void ShouldTranslateOtherDataIntoAnEvent()
        {
            StubEvent @event = new StubEvent(-1);
            IEventTranslator <StubEvent> eventTranslator = new ExampleEventTranslator(TEST_VALUE);

            eventTranslator.TranslateTo(@event, 0);

            Assert.AreEqual(TEST_VALUE, @event.TestString);
        }
        public void ShouldTranslateOtherDataIntoAnEvent()
        {
            StubEvent @event = new StubEvent(-1);
            IEventTranslator<StubEvent> eventTranslator = new ExampleEventTranslator(TEST_VALUE);

            eventTranslator.TranslateTo(@event, 0);

            Assert.AreEqual(TEST_VALUE, @event.TestString);
        }
Esempio n. 3
0
 public bool Equals(StubEvent other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(other.Value == Value);
 }
Esempio n. 4
0
        public void ShouldHandleFatalException()
        {
            var causeException = new Exception();
            var evt            = new StubEvent(0);

            var exceptionHandler = new FatalExceptionHandler();

            try
            {
                exceptionHandler.HandleEventException(causeException, 0L, evt);
            }
            catch (Exception ex)
            {
                Assert.AreEqual(causeException, ex.InnerException);
            }
        }
        public void ShouldHandleFatalException()
        {
            var causeException = new Exception();
            var evt = new StubEvent(0);

            var exceptionHandler = new FatalExceptionHandler();

            try
            {
                exceptionHandler.HandleEventException(causeException, 0L, evt);
            }
            catch (Exception ex)
            {
                Assert.AreEqual(causeException, ex.InnerException);
            }
        }
 public void Copy(StubEvent evt)
 {
     Value = evt.Value;
 }
 public bool Equals(StubEvent other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.Value == Value;
 }
Esempio n. 8
0
 public void Copy(StubEvent evt)
 {
     Value = evt.Value;
 }