Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 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);
     }
 }
Esempio n. 3
0
 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);
     }
 }
Esempio n. 4
0
        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);
             * }*/
        }
Esempio n. 5
0
 private void BeforeGenerateAction(ICodeGenerator codeGenerator)
 {
     codeGenerator.BeforeGenerate();
 }