Esempio n. 1
0
        public void cant_abort_without_transaction_identifier()
        {
            var frame  = new BasicFrame("ABORT");
            var client = Substitute.For <IStompClient>();

            var    sut    = new AbortHandler();
            Action actual = () => sut.Process(client, frame);

            actual.ShouldThrow <BadRequestException>();
        }
Esempio n. 2
0
        public void abort_if_transaction_was_specified()
        {
            var frame = new BasicFrame("ABORT");

            frame.Headers["transaction"] = "aa";
            var client = Substitute.For <IStompClient>();

            var sut = new AbortHandler();

            sut.Process(client, frame);

            client.Received().RollbackTransaction("aa");
        }