Exemplo n.º 1
0
 //[Fact]
 public void release_dir_with_no_offset()
 {
     var proj = new Project("MakeSharp",AnySolution());
     proj.ReleaseDirOffset = "net45";
     var asmp = proj.ReleasePathForAssembly();
     var other = proj.ReleasePathForAssembly("CavemanTools.dll");
 } 
Exemplo n.º 2
0
        public Project CreateProject(int tableCount = 10)
        {
            Project project = new Project();

            ProjectContext.Initialize(project);

            project.DataTypeMappings = (new SqlServerWorker()).GetDataTypeMappingConfigurations().Single(o => o.Language == "CSharp").DataTypeMappings;

            for (int i = 0; i < tableCount; i++)
                project.TableMappings.Add(CreateTableMapping(project));

            return project;
        }
Exemplo n.º 3
0
        public TableMapping CreateTableMapping(Project project)
        {
            string random = this.Random.Next().ToString();
            string tableName = "Table{0}".FormatString(random);
            string className = "Class{0}".FormatString(random);
            TableMapping table = new TableMapping() {
                ClassName = className,
                SchemaName = "dbo",
                TableName = tableName
            };

            for (int i = 0; i < this.Random.Next(1, 25); i++)
                table.ColumnMappings.Add(CreateColumnMapping(table));

            table.ColumnMappings.First().PrimaryKey = true;
            table.JoinToProject(project);

            return table;
        }