Beispiel #1
0
        public ProjectFileWorkspace(IActorRefFactory factory)
            : base(new WorkspaceSuperviser(factory, "Project_File_Workspace"))
        {
            _projectFile = new ProjectFile();

            Projects = new ProjectMutator(Engine, this);
            Source   = new SourceMutator(Engine, this);
            Entrys   = new EntryMutator(Engine);
            Build    = new BuildMutator(Engine);

            Analyzer.RegisterRule(new SourceRule());
        }
Beispiel #2
0
        public void ShouldInitializeEachProjectInSolution()
        {
            // arrange
            var options = new StrykerOptions();
            var target  = new ProjectMutator(_initialisationProcessProviderMock.Object, _mutationTestProcessProviderMock.Object);

            _initialisationProcessMock.Setup(x => x.Initialize(It.IsAny <IStrykerOptions>())).Returns(_mutationTestInput);
            _initialisationProcessMock.Setup(x => x.InitialTest(It.IsAny <IStrykerOptions>())).Returns(5);

            // act
            var result = target.MutateProject(options, _reporterMock.Object);

            // assert
            result.ShouldNotBeNull();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            var context = GetContext(args);

            var apiModels     = new RoslynModelGenerator().Generate(context);
            var generatedCode = new ImplementationGenerator().Generate(context, apiModels);
            var success       = new ProjectMutator().Mutate(context, generatedCode);

            Console.WriteLine(
                $"Generated interfaces for {apiModels.Count} types:{Environment.NewLine}" +
                String.Join(Environment.NewLine, apiModels.Select(x => $" - {x.Api} ({x.Declarations.Count} members)")));

            if (Debugger.IsAttached)
            {
                Console.ReadLine();
            }
        }