public void BuildPicture() { if (basicPictureLocationList != null) { picture = new AutoConstructPicture(_form, _pictureBox); picture.Construct(basicPictureLocationList); } }
public void AutoConstructPictureTest() { AutoConstructPicture autoConstruct = new AutoConstructPicture(formGameTable, pictureBox); var controls = formGameTable.Controls.Cast<Control>(); autoConstruct.Construct(puzzles); List<Puzzle> puzzlesAfterConstruction = controls .Where(x => x.GetType() == typeof(Puzzle)) .Cast<Puzzle>() .ToList(); Assert.AreEqual(puzzlesAfterConstruction.Count, puzzles.Count * 2); }