Example #1
0
        public void ShouldCallLogError()
        {
            var wrappedBoltWriter = Substitute.For <IBoltWriter>();
            var subjectUndertest  = new ThreadSafeBoltWriter(wrappedBoltWriter);

            subjectUndertest.LogError("Error");
            subjectUndertest.Shutdown();

            wrappedBoltWriter.Received().LogError("Error");
        }
Example #2
0
        public void ShouldCallEmitTupleDirect()
        {
            var wrappedBoltWriter = Substitute.For <IBoltWriter>();
            var subjectUndertest  = new ThreadSafeBoltWriter(wrappedBoltWriter);

            subjectUndertest.EmitTupleDirect(null, null, 5, null);
            subjectUndertest.Shutdown();

            wrappedBoltWriter.Received().EmitTupleDirect(null, null, 5, null);
        }
Example #3
0
        public void ShouldCallAcknowledge()
        {
            var wrappedBoltWriter = Substitute.For <IBoltWriter>();
            var subjectUndertest  = new ThreadSafeBoltWriter(wrappedBoltWriter);

            subjectUndertest.Acknowledge(2);
            subjectUndertest.Shutdown();

            wrappedBoltWriter.Received().Acknowledge(2);
        }