public void ShowHaarViewer() { using (var viewer = new HaarViewer()) { WinFormsApprovals.Verify(viewer); } }
public void TestPieChartCompareWindow() { frmMain main = new frmMain(); ChartSingleCompareOrig chart = main.LaunchChart(712, "splitdisplay", false); WinFormsApprovals.Verify(chart); }
public void AddInstrument_FormResize() { using (var form = new MonkeyCancelFrm()) { form.Show(); form.InstrumentDefinitions = Helpers.CreateListOf4ProductDefs(); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZBU5")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZFU5")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZTU5")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZNU5")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZZU5")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZZU6")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZZU7")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZZU8")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZZU9")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZZUA")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZZUB")); form.Width += 50; form.Height += 50; WinFormsApprovals.Verify(form); } }
public void TestControlApproved() { ApprovalResults.UniqueForMachineName(); WinFormsApprovals.Verify(new Button { BackColor = Color.LightBlue, Text = "Help" }); }
public void VerifyScenario() { var frm = new SeriesCalculator(); frm.PopulateForm(10); WinFormsApprovals.Verify(frm); }
public void TestBarChartWindow() { frmMain main = new frmMain(); ChartSingleCompareOrig chart = main.LaunchChart(150, "rpfll", false); WinFormsApprovals.Verify(chart); }
public void GenerateOther() { var checkins = Enumerable.Range(0, 8 * 4 * 7) .SelectMany(c => GenerateForDay(c)); WinFormsApprovals.Verify(new CheckInChart(checkins)); }
public void TestControlApproved() { WinFormsApprovals.Verify(new Button { BackColor = Color.LightBlue, Text = "Help" }); }
public void TestBarChartCompare() { frmMain main = new frmMain(); ChartSingleCompareOrig chart = main.LaunchChart(406, "splitdisplay", false); chart.Show(); WinFormsApprovals.Verify(chart); }
public void TestCheckins() { var checkins = new[] { new CheckIn(1, 9, 30, 10) , new CheckIn(1, 14, 30, 10) , new CheckIn(1, 19, 30, 100) , new CheckIn(2, 10, 0, 500) }; WinFormsApprovals.Verify(new CheckInChart(checkins)); }
public void GenerateHunter() { var start = new DateTime(2012, 12, 30); string csvFile = @"C:\code\DashBoard\DashBoard\checkins.csv"; var checkins = ProcessCsvFile(csvFile) .Select(p => new { FileCount = int.Parse(p[0]), Date = DateTime.Parse(p[1]) }) .Select(c => new CheckIn((c.Date - start).Days, c.Date.Hour, c.Date.Minute, c.FileCount)); WinFormsApprovals.Verify(new CheckInChart(checkins)); }
public void TestMeetings() { var meetings = WeekDays().Select(i => new Meeting(i, 8, 0, 10, 5)).Concat(new[] { new Meeting(1, 13, 0, 60, 3), new Meeting(5, 10, 30, 30, 20), new Meeting(8, 9, 0, 90, 10) }); WinFormsApprovals.Verify(new MeetingsChart(meetings, 10)); }
public void TestFormApproval() { using (ApprovalResults.UniqueForDotNetVersion()) { #region usage WinFormsApprovals.Verify(new Form()); #endregion } }
public void HunterMeetings() { var meetings = Mondays() .Select(i => new Meeting(i, 13, 15, 20, 2)) .Concat(new[] { new Meeting(4 * 7 - 3, 13, 0, 60, 5), new Meeting(8 * 7 - 3, 13, 0, 60, 5) }); var chart = new MeetingsChart(meetings, 5); Console.WriteLine("Total Man Hours:{0}".FormatWith(chart.GetTotalManHours())); Console.WriteLine("Percent Of Week:{0}".FormatWith(chart.GetPercentOfWeek())); WinFormsApprovals.Verify(chart); }
public void HeapfulOfRectangles() { var myForm = new MyForm(); WinFormsApprovals.Verify(myForm); // Point start = null; // Point end = null; // throw new ArgumentException(@"Rectangle ‘{{X={0},Y={1},Width={2},Height={3}}}' //cannot have a width or height equal to 0.", start.X, start.Y, end.X - start.X, end.Y - start.Y); }
public void TestControlApproved() { using (ApprovalResults.UniqueForDotNetVersion()) { WinFormsApprovals.Verify( new Button { BackColor = Color.LightBlue, Text = "Help" }); } }
public void TestAddingIceCream() { var form = new AddIceCreamForm(); var iceCream = new IceCreamProduct { Name = "Fatty Cake", Cost = "2.50", Flavor = "Big Haus" }; form.AddIceCreamToFreezer(iceCream); WinFormsApprovals.Verify(form); }
public void AddInstrument_TheLastArrivedFirst() { using (var form = new MonkeyCancelFrm()) { form.Show(); form.InstrumentDefinitions = Helpers.CreateListOf4ProductDefs(); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZTU5")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZNU5")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZBU5")); form.AddInstrument(Helpers.CreateInstrumentByAlias("ZFU5")); WinFormsApprovals.Verify(form.Controls["flowLayoutPanelInstruments"]); } }
public void Should_work_with_this_complex_object() { var treeView = GetTreeView(@"{ 'id': '0001', 'type': 'donut', 'batters': { 'batter': [ { 'id': '1001', 'type': 'Regular' }, { 'id': '1002', 'type': 'Chocolate' }, ] }, 'topping': [ { 'id': '5001', 'type': 'None' }, { 'id': '5002', 'type': 'Glazed', 'tags': [ 'foo', 'bar' ] } ], 'name': 'Cake', 'ppu': 0.55, }"); WinFormsApprovals.Verify(treeView); }
public void Should_work_with_objects_in_arrays() { var treeView = GetTreeView("{ 'foo': [ 'bar', { 'sheldon': 'cooper', 'leonard': 'hofstadter' }, 'quux' ] }"); WinFormsApprovals.Verify(treeView); }
public void TestFormApproval() { ApprovalResults.UniqueForMachineName(); WinFormsApprovals.Verify(new Form()); }
public void TestMainWindow() { frmMain main = new frmMain(); WinFormsApprovals.Verify(main); }
public void Should_work_with_nested_objects() { var treeView = GetTreeView("{ 'the_answer': { 'to_the': { 'universe_is': 42 } } }"); WinFormsApprovals.Verify(treeView); }
public void TestFormApproval() { WinFormsApprovals.Verify(new Form()); }
public void Should_work_with_nested_arrays() { var treeView = GetTreeView("{ 'foo': [ 'bar', [ 'sheldon', 'cooper', 'leonard', 'hofstadter' ], 'quux' ] }"); WinFormsApprovals.Verify(treeView); }
public void TestHunterBugChart() { var bugs = Enumerable.Range(0, 60).SelectMany(i => GenerateHunterBugs(i)); WinFormsApprovals.Verify(new BugsChart(bugs)); }
public void TestEmptyBugChart() { WinFormsApprovals.Verify(new BugsChart(new Bug[0])); }
public void Should_work_with_arrays() { var treeView = GetTreeView("{ 'foo': [ 'bar', 'baz', 'quux' ] }"); WinFormsApprovals.Verify(treeView); }
public void TestEmptyMeetings() { WinFormsApprovals.Verify(new MeetingsChart(new Meeting[0], 10)); }
public void TestEmptyCheckins() { WinFormsApprovals.Verify(new CheckInChart(new CheckIn[0])); }