Exemplo n.º 1
0
        private void WriteUnitTest(string directoryFullName, string contextName)
        {
            var tw = new UnitTestWriter(_schema, _codeWriterSettings);

            if (!string.IsNullOrEmpty(contextName))
            {
                tw.ContextName = contextName;
            }
            var txt = tw.Write();

            if (string.IsNullOrEmpty(txt))
            {
                return;
            }
            var fileName = tw.ClassName + ".cs";
            var path     = Path.Combine(directoryFullName, fileName);

            File.WriteAllText(path, txt);
            //not included in project as this is just for demo
        }
Exemplo n.º 2
0
 private void WriteUnitTest(string directoryFullName, string contextName)
 {
     var tw = new UnitTestWriter(_schema, _codeWriterSettings);
     if (!string.IsNullOrEmpty(contextName)) tw.ContextName = contextName;
     var txt = tw.Write();
     if (string.IsNullOrEmpty(txt)) return;
     var fileName = tw.ClassName + ".cs";
     var path = Path.Combine(directoryFullName, fileName);
     File.WriteAllText(path, txt);
     //not included in project as this is just for demo
 }