public void MigrateXprojProjectFactory_ValidCsproj_FindsCsproj()
        {
            var csproj     = Path.Combine(RootLocation, "XprojMigrationTests.csproj");
            var fileSystem = CreateFileSystem();

            fileSystem.Create(csproj);

            var loggedMessages = new List <LogMessage>();
            var logger         = IVsUpgradeLoggerFactory.CreateLogger(loggedMessages);
            var migrator       = new MigrateXprojProjectFactory(ProcessRunnerFactory.CreateRunner(), fileSystem);

            Assert.Equal(csproj, migrator.GetCsproj(RootLocation, "XprojMigrationTests", XprojLocation, logger));
            Assert.Equal(0, loggedMessages.Count);
        }
        public void MigrateXprojProjectFactory_NoCsproj_LogsError()
        {
            var csproj     = Path.Combine(RootLocation, "XprojMigrationTests.csproj");
            var fileSystem = CreateFileSystem();

            var loggedMessages = new List <LogMessage>();
            var logger         = IVsUpgradeLoggerFactory.CreateLogger(loggedMessages);
            var migrator       = new MigrateXprojProjectFactory(ProcessRunnerFactory.CreateRunner(), fileSystem);

            Assert.Equal("", migrator.GetCsproj(RootLocation, "XprojMigrationTests", XprojLocation, logger));
            Assert.Equal(1, loggedMessages.Count);
            Assert.Equal(new LogMessage
            {
                Level   = (uint)__VSUL_ERRORLEVEL.VSUL_ERROR,
                Project = "XprojMigrationTests",
                File    = XprojLocation,
                Message = $"Expected to find migrated cpsroj in {RootLocation}, but did not find any."
            }, loggedMessages[0]);
        }