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> >(); }
protected static void Try(Action assertAction) { exception = Catch.Exception(assertAction); }
public override void When() => _exception = Catch.Exception(() => _result = FindShortestPath(_startingPoint, _destinationPoint, _isWalkableFunc, _anyEstimateHFunc) );
protected override void Because() { thrown = Catch.Exception(() => ((ICommitEvents)Store).Commit(invalidCommitSequence)); }
protected override void Because() { _exception = Catch.Exception(() => _position = _positionParser.Parse(_positionText)); }
protected static void Try(Action callback) { thrown = Catch.Exception(callback); }
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)); }
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())); }
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>(); }
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>(); }
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>>(); }
static When_called_from_a_static_initializer() { exception = Catch.Exception(() => The <IDbConnection>()); }
public override void Act() { _exception = Catch.Exception(() => Fraction.MinusOne.Divide(Fraction.Zero)); }
protected override void Because() { _exception = Catch.Exception(() => { _eventStore = _wireup.Build(); }); }
public void When_The_Message_Is_Already_In_The_Message_Store() { _exception = Catch.Exception(() => _mySqlMessageStore.Add(_messageEarliest)); _exception.Should().BeNull(); }
public override void When() => _exception = Catch.Exception(() => _result = Text.Create(_rawText) );