public void TestInterfacesGenerator() { try { baseGenerator.Init(Globals.InterfaceProject, null, new BuildAggregator()); } catch (Exception ex) { Log.Error(ex); } baseGenerator.BeforeGenerate(); string ret = @" // WARNING: Generated File! Do not modify by hand! // ************************************************************* using System; public interface IPerson { string GetPerson ( int id ); void Init ( ); void SetData ( out string nome , bool isMale ); }"; using (StreamReader reader = new StreamReader(Path.Combine(Path.Combine(Globals.InterfaceProject.OutputPath, "Core/IPerson"), "IPerson.cs"))) { string inter = reader.ReadToEnd(); Assert.AreEqual(inter, ret); } }
public void TestSmsSchemaGeneration() { neo.BeforeGenerate(); using (StreamReader reader = new StreamReader(Path.Combine(Globals.SmsTestProject.OutputPath, "NeoModelSchema.xml"))) { string xml = reader.ReadToEnd(); //Assert.AreEqual(xml, smsModelOuput); } }
public void TestSmsSchemaGeneration() { model.BeforeGenerate(); using (StreamReader reader = new StreamReader(Path.Combine(Globals.SmsTestProject.OutputPath, "bin/Model.hbm.xml"))) { string xml = reader.ReadToEnd(); Assert.AreEqual(xml.IndexOf("$"), -1, "Unvalid command?"); Assert.AreEqual(xml, smsModelOuput); } }
public void TestSmsConfigGeneration() { config.BeforeGenerate(); /*using (StreamReader reader = new StreamReader(Path.Combine(Globals.SmsTestProject.OutputPath, "Model.hbm.xml"))) { * string xml = reader.ReadToEnd(); * Assert.AreEqual(xml.IndexOf("$"), -1, "Unvalid command?"); * Assert.AreEqual(xml, smsModelOuput); * }*/ }
private void BeforeGenerateAction(ICodeGenerator codeGenerator) { codeGenerator.BeforeGenerate(); }