Esempio n. 1
0
 public void Setup()
 {
     sut = new Parser();
 }
Esempio n. 2
0
        public void RewriteTest(UnitTestLocationInfo info, string originalExpected, string newExpected)
        {
            Encoding enc = null;
            string content = null;
            var fileRepository = fileRepositoryFactory();
            var bytes = fileRepository.Read(info.Filepath);

            enc = encodings.First(x => TryConvertFromEncoding(x, bytes, out content));

            var newTestContent = new Parser().ReplaceExpected(content, info.LineNumber, originalExpected, newExpected);
            fileRepository.Write(info.Filepath, enc.GetBytes(newTestContent));
        }