Example #1
0
        public static T BindDummy <T>(this IFixtureKernel kernel)
            where T : class
        {
            var result = TestDouble.For <T>().Dummy();

            kernel.Bind(result);
            return(result);
        }
Example #2
0
        public static ISaboteurVerify <T> ReplaceWithSaboteur <T, TException>(
            this IFixtureKernel kernel,
            Expression <Action <T> > expression)
            where T : class
            where TException : Exception, new()
        {
            var result = TestDouble.For <T>().Verifiable.Saboteur <TException>(expression);

            kernel.Bind(result.Dependency);
            return(result);
        }
        public void MethodArgTest(
            object value,
            MethodArgType argumentType,
            Type expectedType,
            object expected,
            string keyword)
        {
            var dependency = TestDouble.For <ITestCaseCell>().Stub(x => x.Value, value);
            var sut        = MethodArgument.Create(dependency, argumentType);

            sut.Type.Should().Be(expectedType, "SUT type was not expected type.");
            sut.Value.Should().Be(expected, "SUT values was not expected value.");
            sut.CSharpType.Should().Be(keyword);
        }
 protected override void Given()
 {
     sut = d => TestDouble.For <IGherkinBlockStep>().Stub(x => x.Description, d);
 }