public void GeneratedMainMethodCallWithNoParametersCode() { NRefactoryToRubyConverter converter = new NRefactoryToRubyConverter(SupportedLanguage.CSharp); converter.IndentString = " "; converter.Convert(mainMethodWithNoParametersCode); string code = converter.GenerateMainMethodCall(converter.EntryPointMethods[0]); Assert.AreEqual("Foo.Main()", code); }
public void ExpectedCodeWrittenToFile() { NRefactoryToRubyConverter converter = new NRefactoryToRubyConverter(SupportedLanguage.CSharp, parseInfo); string expectedCode = converter.Convert(sourceCode, SupportedLanguage.CSharp) + "\r\n" + "\r\n" + converter.GenerateMainMethodCall(converter.EntryPointMethods[0]); List<ConvertedFile> expectedSavedFiles = new List<ConvertedFile>(); expectedSavedFiles.Add(new ConvertedFile(target.FileName, expectedCode, Encoding.Unicode)); Assert.AreEqual(expectedSavedFiles, convertProjectCommand.SavedFiles); }