Exemplo n.º 1
0
        public void ExecuteCorrectlyInvokesAction()
        {
            // Arrange
            var specimen = new object();

            var             verified = false;
            Action <object> spy      = s => verified = specimen.Equals(s);

            var sut = new UnspecifiedSpecimenCommand <object>(spy);
            // Act
            var dummyContainer = new DelegatingSpecimenContext();

            sut.Execute(specimen, dummyContainer);
            // Assert
            Assert.True(verified);
        }
        public void ExecuteCorrectlyInvokesAction()
        {
            // Fixture setup
            var specimen = new object();

            var verified = false;
            Action<object> spy = s => verified = specimen.Equals(s);

            var sut = new UnspecifiedSpecimenCommand<object>(spy);
            // Exercise system
            var dummyContainer = new DelegatingSpecimenContext();
            sut.Execute(specimen, dummyContainer);
            // Verify outcome
            Assert.True(verified);
            // Teardown
        }
Exemplo n.º 3
0
        public void ExecuteCorrectlyInvokesAction()
        {
            // Fixture setup
            var specimen = new object();

            var             verified = false;
            Action <object> spy      = s => verified = specimen.Equals(s);

            var sut = new UnspecifiedSpecimenCommand <object>(spy);
            // Exercise system
            var dummyContainer = new DelegatingSpecimenContext();

            sut.Execute(specimen, dummyContainer);
            // Verify outcome
            Assert.True(verified);
            // Teardown
        }