Represents context of a static test-case command.
Inheritance: TestCommandContext
 public void GetMethodContextWithNullTestObjectThrows()
 {
     var sut = new StaticTestCaseCommandContext(
         Mocked.Of<IMethodInfo>(),
         Mocked.Of<IMethodInfo>(),
         Mocked.Of<ISpecimenBuilderFactory>(),
         new object[0]);
     Assert.Throws<ArgumentNullException>(() => sut.GetMethodContext(null));
 }
        public void InitializeCorrectlyInitializes()
        {
            var testMethod = Mocked.Of<IMethodInfo>();
            var actualMethod = Mocked.Of<IMethodInfo>();
            var factory = Mocked.Of<ISpecimenBuilderFactory>();
            var arguments = new[] { new object(), new object() };

            var sut = new StaticTestCaseCommandContext(testMethod, actualMethod, factory, arguments);

            Assert.Equal(testMethod, sut.TestMethod);
            Assert.Equal(actualMethod, sut.ActualMethod);
            Assert.Equal(factory, sut.BuilderFactory);
            Assert.Equal(arguments, sut.ExplicitArguments);
        }
        public void GetStaticMethodContextReturnsCorrectResult()
        {
            var testMethod = Mocked.Of<IMethodInfo>();
            var actualMethod = Mocked.Of<IMethodInfo>();
            var sut = new StaticTestCaseCommandContext(
                testMethod,
                actualMethod,
                Mocked.Of<ISpecimenBuilderFactory>(),
                new object[0]);

            var actual = sut.GetStaticMethodContext();

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