public void SutNotCreated_SetsDependencyToTestSuitInstance()
        {
            //arrange
            var dependencyTestSuit = TestSuit.Create <Dependency1>();

            //act
            _testSuit.SetDependencyToTestSuit <IDependency1>(dependencyTestSuit);

            //assert
            _testSuit.GetSuit <IDependency1>().Should().Be(dependencyTestSuit);
            _testSuit.GetDependency <IDependency1>().Should().Be(dependencyTestSuit.Sut);
            _testSuit.Sut.Dependency1.Should().Be(dependencyTestSuit.Sut);
        }
Ejemplo n.º 2
0
        public RunnerIntegratedTests()
        {
            _suit.Reset();

            // RobotRunner has a dependency to ICommandExecutor which is set up to be an instance
            // of the real CommandExecutor with ILogger<CommandExecutor> dependency to be a loose mock
            _suit.SetDependencyToTestSuit <ICommandExecutor, CommandExecutor>();
            _suit.SetupDependencySuit <ICommandExecutor>(s =>
                                                         s.SetDependencyToLooseMock <ILogger <CommandExecutor> >());
        }