Represents context of a parameterized command.
Inheritance: TestCommandContext
 public void GetMethodContextWithNullThrows()
 {
     var sut = new ParameterizedCommandContext(
         Mocked.Of<IMethodInfo>(),
         Mocked.Of<ISpecimenBuilderFactory>(),
         Mocked.Of<IEnumerable<object>>());
     Assert.Throws<ArgumentNullException>(() => sut.GetMethodContext(null));
 }
        public void InitializeCorrectlyInitializesProperties()
        {
            var testMethod = Mocked.Of<IMethodInfo>();
            var factory = Mocked.Of<ISpecimenBuilderFactory>();
            var arguments = Mocked.Of<IEnumerable<object>>();

            var sut = new ParameterizedCommandContext(testMethod, factory, arguments);

            Assert.Equal(testMethod, sut.TestMethod);
            Assert.Equal(factory, sut.BuilderFactory);
            Assert.Equal(arguments, sut.ExplicitArguments);
        }
        public void GetStaticMethodContextReturnsCorrectResult()
        {
            var testMethod = Mocked.Of<IMethodInfo>();
            var sut = new ParameterizedCommandContext(
                testMethod,
                Mocked.Of<ISpecimenBuilderFactory>(),
                Mocked.Of<IEnumerable<object>>());

            var actual = sut.GetStaticMethodContext();

            actual.AssertHasCorrectValues(
                testMethod.MethodInfo,
                testMethod.MethodInfo,
                null,
                null);
        }
 public void SutIsTestCommandContext()
 {
     var sut = new ParameterizedCommandContext(
         Mocked.Of<IMethodInfo>(),
         Mocked.Of<ISpecimenBuilderFactory>(),
         Mocked.Of<IEnumerable<object>>());
     Assert.IsAssignableFrom<TestCommandContext>(sut);
 }