예제 #1
0
        public void ATest(bool alreadyExists)
        {
            var directory = new DirectoryInfo(Directory.GetCurrentDirectory());
            FileInfo[] files = directory.GetFiles( "*.nupkg" );
            foreach( FileInfo file in files )
            {
                file.Delete();
            }

            string fileNameFirstPart = "BirdJournal.Windows.1.2.3." + ( new Random() ).Next( 99999 );
            File.WriteAllText( fileNameFirstPart + ".symbols.nupkg", "hi" );
            var replacer = new FileNameReplacer( "*.nupkg", "Symbols.", "" );
            replacer.Execute();
            string targetFileName = fileNameFirstPart + ".nupkg";
            if( alreadyExists )
                File.WriteAllText( targetFileName, "hi" );
            Assert.True( File.Exists( targetFileName ) );
        }
예제 #2
0
 static void Main( string[] args )
 {
     var replacer = new FileNameReplacer( args[0], args[1], args[2] );
     replacer.Execute();
 }