public void When_There_Is_No_Message_In_The_Inbox()
        {
            var exception = Catch.Exception(() => _dynamoDbInbox.Get <MyCommand>(Guid.NewGuid(), "some key"));

            AssertionExtensions.Should((object)exception).BeOfType <RequestNotFoundException <MyCommand> >();
        }
예제 #2
0
 protected static void Try(Action assertAction)
 {
     exception = Catch.Exception(assertAction);
 }
예제 #3
0
 public override void When() => _exception = Catch.Exception(() =>
                                                             _result = FindShortestPath(_startingPoint, _destinationPoint, _isWalkableFunc, _anyEstimateHFunc)
                                                             );
예제 #4
0
 protected override void Because()
 {
     thrown = Catch.Exception(() => ((ICommitEvents)Store).Commit(invalidCommitSequence));
 }
예제 #5
0
 protected override void Because()
 {
     _exception = Catch.Exception(() => _position = _positionParser.Parse(_positionText));
 }
 protected static void Try(Action callback)
 {
     thrown = Catch.Exception(callback);
 }
예제 #7
0
 protected override void Because()
 {
     thrown = Catch.Exception(() => Store.OpenStream(null, int.MaxValue));
 }
        public void AddingAssemblyShouldntThrowIfNoIConventionFinderConstructor()
        {
            var ex = Catch.Exception(() => finder.AddAssembly(typeof(ConventionWithoutValidConstructor).Assembly));

            ex.ShouldBeNull();
        }
        public void When_Posting_A_Message_And_There_Is_No_Message_Producer()
        {
            _exception = Catch.Exception(() => _commandProcessor.Post(_myCommand));

            _exception.Should().BeOfType <InvalidOperationException>();
        }
 protected override void Because()
 {
     _exception = Catch.Exception(() => _gridSize = _gridSizeParser.Parse(_gridSizeText));
 }
        public void AddingSingleShouldntThrowIfHasIConventionFinderConstructor()
        {
            var ex = Catch.Exception(() => finder.Add <ConventionWithIConventionFinderConstructor>());

            ex.ShouldBeNull();
        }
 protected override void Because()
 {
     _thrown = Catch.Exception(() => Hook.PreCommit(_beyondEndOfStream));
 }
 protected override void Because()
 {
     _thrown = Catch.Exception(() => Hook.PreCommit(_failedAttempt));
 }
 Exception get_exception_thrown_by(Action action)
 {
     return(Catch.Exception(action));
 }
예제 #15
0
 protected override void Because()
 {
     exception = Catch.Exception(() => ravenPersistence.GetUndispatchedCommits().ToList());
 }
 protected override void Because()
 {
     thrown = Catch.Exception(() => Stream.CommitChanges(DupliateCommitId));
 }
 protected override void Because()
 {
     _thrown = Catch.Exception(() => _persistence2.Commit(_attempt2));
 }
 protected override void Because()
 {
     thrown = Catch.Exception(() => Stream.CommitChanges(Guid.NewGuid()));
 }
예제 #19
0
 protected override void Because()
 {
     thrown = Catch.Exception(() => Store.OpenStream(streamId, MinRevision, int.MaxValue));
 }
 public void should_throw_an_exception_when_adding_to_the_committed_collection()
 {
     Catch.Exception(() => Stream.CommittedEvents.Add(null)).ShouldBeInstanceOf <NotSupportedException>();
 }
예제 #21
0
 protected override void Because()
 {
     thrown = Catch.Exception(() => ((ICommitEvents)Store).Commit(corrupt));
 }
 public void should_throw_an_exception_when_clearing_the_uncommitted_collection()
 {
     Catch.Exception(() => Stream.UncommittedEvents.Clear()).ShouldBeInstanceOf <NotSupportedException>();
 }
예제 #23
0
 protected override void Because()
 {
     thrown = Catch.Exception(() => ((ICommitEvents)Store).Commit(invalidStreamRevision));
 }
 public void should_throw_an_exception_when_removing_from_the_uncommitted_collection()
 {
     Catch.Exception(() => Stream.UncommittedEvents.Remove(null)).ShouldBeInstanceOf <NotSupportedException>();
 }
 public void When_There_Is_No_Message_In_The_Sql_Inbox_Get()
 {
     Guid commandId = Guid.NewGuid();
     var exception = Catch.Exception(() => _mysqlInBox.Get<MyCommand>(commandId, _contextKey));
     exception.Should().BeOfType<RequestNotFoundException<MyCommand>>();
 }
예제 #26
0
 static When_called_from_a_static_initializer()
 {
     exception = Catch.Exception(() => The <IDbConnection>());
 }
예제 #27
0
 public override void Act()
 {
     _exception = Catch.Exception(() => Fraction.MinusOne.Divide(Fraction.Zero));
 }
 protected override void Because()
 {
     _exception = Catch.Exception(() => { _eventStore = _wireup.Build(); });
 }
예제 #29
0
 public void When_The_Message_Is_Already_In_The_Message_Store()
 {
     _exception = Catch.Exception(() => _mySqlMessageStore.Add(_messageEarliest));
     _exception.Should().BeNull();
 }
예제 #30
0
 public override void When() => _exception = Catch.Exception(() =>
                                                             _result = Text.Create(_rawText)
                                                             );