public void TestProbeCreator_Create_CreatesANewTestProbeEveryTime()
        {
            //arrange
            TestProbeCreator sut     = CreateTestProbeCreator();
            TestProbe        result1 = sut.Create(TestKitBase);

            //act
            TestProbe result2 = sut.Create(TestKitBase);

            //assert
            result1.Should().NotBeSameAs(result2);
        }
Example #2
0
        public void TestProbeCreator_Create_DoesNotThrowException()
        {
            //arrange
            TestProbeCreator sut = CreateTestProbeCreator();

            //act
            Action act = () => sut.Create(this);

            //assert
            act.ShouldNotThrow();
        }
Example #3
0
        public void TestProbeCreator_CreateWithNullTestKitBase_ThrowsArgumentNullException()
        {
            //arrange
            TestProbeCreator sut = CreateTestProbeCreator();

            //act
            Action act = () => sut.Create(null);

            //assert
            act.ShouldThrow <ArgumentNullException>();
        }
        public void TestProbeCreator_Create_OnlyCreatesOneTestProbe()
        {
            //arrange
            TestProbeCreator sut = CreateTestProbeCreator();

            //act
            sut.Create(TestKitBase);

            //assert
            CallCount.Should().Be(1);
        }
        public void TestProbeCreator_Create_CreatesTestProbeWithNoName()
        {
            //arrange
            TestProbeCreator sut = CreateTestProbeCreator();

            //act
            sut.Create(TestKitBase);

            //assert
            NamePassedIntoShim.Should().BeNull();
        }
        public void TestProbeCreator_Create_ReturnsTestProbeFromTestKit()
        {
            //arrange
            TestProbeCreator sut = CreateTestProbeCreator();

            //act
            TestProbe result = sut.Create(TestKitBase);

            //assert
            result.Should().BeSameAs(TestProbeReturnedFromShim);
        }
Example #7
0
        public void TestProbeCreator_Create_ReturnsWorkingTestProbe()
        {
            //arrange
            TestProbeCreator sut = CreateTestProbeCreator();

            //act
            TestProbe result = sut.Create(this);

            //assert
            Guid guid = Guid.NewGuid();

            result.Tell(guid);
            result.ExpectMsg(guid);
        }