Added:
trunk/Samples/Pocket PC/Tester/
trunk/Samples/Pocket PC/Tester/FailDetails.Designer.cs
trunk/Samples/Pocket PC/Tester/FailDetails.cs
trunk/Samples/Pocket PC/Tester/FailDetails.resx
trunk/Samples/Pocket PC/Tester/Form1.Designer.cs
trunk/Samples/Pocket PC/Tester/Form1.cs
trunk/Samples/Pocket PC/Tester/Form1.resx
trunk/Samples/Pocket PC/Tester/MySql.Data.Tests.CF.dll.config
trunk/Samples/Pocket PC/Tester/Program.cs
trunk/Samples/Pocket PC/Tester/Properties/
trunk/Samples/Pocket PC/Tester/Properties/AssemblyInfo.cs
trunk/Samples/Pocket PC/Tester/Properties/Resources.Designer.cs
trunk/Samples/Pocket PC/Tester/Properties/Resources.resx
trunk/Samples/Pocket PC/Tester/Properties/green.png
trunk/Samples/Pocket PC/Tester/Properties/red.png
trunk/Samples/Pocket PC/Tester/Properties/white.png
trunk/Samples/Pocket PC/Tester/Tester.csproj
trunk/TestSuite/MySql.Data.Tests.CF.csproj
trunk/TestSuite/Source/Tester/
trunk/TestSuite/Source/Tester/TestClasses.cs
trunk/TestSuite/Source/Tester/TestRunner.cs
Log:
Sample application that implements a very basic style NUnit testing. We use this application for running our test suite on compact framework devices.
The tester folder is the part that directly interfaces with the test suite and is called by the GUI front end.
Added: trunk/Samples/Pocket PC/Tester/FailDetails.Designer.cs
===================================================================
--- trunk/Samples/Pocket PC/Tester/FailDetails.Designer.cs 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/FailDetails.Designer.cs 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,106 @@
+namespace DeviceApplication1
+{
+ partial class FailDetails
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+ private System.Windows.Forms.MainMenu mainMenu1;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.mainMenu1 = new System.Windows.Forms.MainMenu();
+ this.msg = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.trace = new System.Windows.Forms.TextBox();
+ this.ok = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // msg
+ //
+ this.msg.Location = new System.Drawing.Point(3, 34);
+ this.msg.Multiline = true;
+ this.msg.Name = "msg";
+ this.msg.Size = new System.Drawing.Size(234, 52);
+ this.msg.TabIndex = 0;
+ //
+ // label1
+ //
+ this.label1.Location = new System.Drawing.Point(3, 11);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(100, 20);
+ this.label1.Text = "Message";
+ //
+ // label2
+ //
+ this.label2.Location = new System.Drawing.Point(3, 98);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(100, 20);
+ this.label2.Text = "Stack trace";
+ //
+ // trace
+ //
+ this.trace.Location = new System.Drawing.Point(3, 121);
+ this.trace.Multiline = true;
+ this.trace.Name = "trace";
+ this.trace.Size = new System.Drawing.Size(234, 118);
+ this.trace.TabIndex = 3;
+ //
+ // ok
+ //
+ this.ok.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.ok.Location = new System.Drawing.Point(165, 256);
+ this.ok.Name = "ok";
+ this.ok.Size = new System.Drawing.Size(72, 20);
+ this.ok.TabIndex = 5;
+ this.ok.Text = "OK";
+ //
+ // FailDetails
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.AutoScroll = true;
+ this.ClientSize = new System.Drawing.Size(240, 294);
+ this.ControlBox = false;
+ this.Controls.Add(this.ok);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.trace);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.msg);
+ this.MinimizeBox = false;
+ this.Name = "FailDetails";
+ this.Text = "FailDetails";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox msg;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.TextBox trace;
+ private System.Windows.Forms.Button ok;
+ }
+}
\ No newline at end of file
Added: trunk/Samples/Pocket PC/Tester/FailDetails.cs
===================================================================
--- trunk/Samples/Pocket PC/Tester/FailDetails.cs 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/FailDetails.cs 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,48 @@
+// Copyright (C) 2004-2007 MySQL AB
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation
+//
+// There are special exceptions to the terms and conditions of the GPL
+// as it is applied to this software. View the full text of the
+// exception in file EXCEPTIONS in the directory of this software
+// distribution.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace DeviceApplication1
+{
+ public partial class FailDetails : Form
+ {
+ public FailDetails()
+ {
+ InitializeComponent();
+ }
+
+ public string Message
+ {
+ set { msg.Text = value; }
+ }
+
+ public string Trace
+ {
+ set { trace.Text = value; }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/Samples/Pocket PC/Tester/FailDetails.resx
===================================================================
--- trunk/Samples/Pocket PC/Tester/FailDetails.resx 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/FailDetails.resx 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="$this.FormFactorShadowProperty" xml:space="preserve">
+ <value>POCKET_PC_2003_PORTRAIT</value>
+ </metadata>
+ <metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+</root>
\ No newline at end of file
Added: trunk/Samples/Pocket PC/Tester/Form1.Designer.cs
===================================================================
--- trunk/Samples/Pocket PC/Tester/Form1.Designer.cs 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/Form1.Designer.cs 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,117 @@
+namespace DeviceApplication1
+{
+ partial class MainForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+ private System.Windows.Forms.MainMenu mainMenu1;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
+ this.mainMenu1 = new System.Windows.Forms.MainMenu();
+ this.menuItem1 = new System.Windows.Forms.MenuItem();
+ this.runTestsMenu = new System.Windows.Forms.MenuItem();
+ this.showDetailsMenu = new System.Windows.Forms.MenuItem();
+ this.label1 = new System.Windows.Forms.Label();
+ this.testTree = new System.Windows.Forms.TreeView();
+ this.imageList1 = new System.Windows.Forms.ImageList();
+ this.runSelected = new System.Windows.Forms.MenuItem();
+ this.SuspendLayout();
+ //
+ // mainMenu1
+ //
+ this.mainMenu1.MenuItems.Add(this.menuItem1);
+ //
+ // menuItem1
+ //
+ this.menuItem1.MenuItems.Add(this.runTestsMenu);
+ this.menuItem1.MenuItems.Add(this.showDetailsMenu);
+ this.menuItem1.MenuItems.Add(this.runSelected);
+ this.menuItem1.Text = "&Options";
+ //
+ // runTestsMenu
+ //
+ this.runTestsMenu.Text = "&Run Tests";
+ this.runTestsMenu.Click += new System.EventHandler(this.runTestsMenu_Click);
+ //
+ // showDetailsMenu
+ //
+ this.showDetailsMenu.Text = "&Show Details...";
+ this.showDetailsMenu.Click += new System.EventHandler(this.showDetailsMenu_Click);
+ //
+ // label1
+ //
+ this.label1.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
+ this.label1.Location = new System.Drawing.Point(11, 11);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(108, 20);
+ this.label1.Text = "Tests:";
+ //
+ // testTree
+ //
+ this.testTree.ImageIndex = 2;
+ this.testTree.ImageList = this.imageList1;
+ this.testTree.Location = new System.Drawing.Point(3, 34);
+ this.testTree.Name = "testTree";
+ this.testTree.SelectedImageIndex = 2;
+ this.testTree.Size = new System.Drawing.Size(234, 231);
+ this.testTree.TabIndex = 17;
+ this.imageList1.Images.Clear();
+ this.imageList1.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
+ this.imageList1.Images.Add(((System.Drawing.Image)(resources.GetObject("resource1"))));
+ this.imageList1.Images.Add(((System.Drawing.Image)(resources.GetObject("resource2"))));
+ //
+ // runSelected
+ //
+ this.runSelected.Text = "Run Selected &Tests";
+ this.runSelected.Click += new System.EventHandler(this.runSelected_Click);
+ //
+ // MainForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.AutoScroll = true;
+ this.ClientSize = new System.Drawing.Size(240, 268);
+ this.Controls.Add(this.testTree);
+ this.Controls.Add(this.label1);
+ this.Menu = this.mainMenu1;
+ this.Name = "MainForm";
+ this.Text = "MySQL Tester";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.MenuItem menuItem1;
+ private System.Windows.Forms.MenuItem runTestsMenu;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TreeView testTree;
+ private System.Windows.Forms.ImageList imageList1;
+ private System.Windows.Forms.MenuItem showDetailsMenu;
+ private System.Windows.Forms.MenuItem runSelected;
+ }
+}
+
Added: trunk/Samples/Pocket PC/Tester/Form1.cs
===================================================================
--- trunk/Samples/Pocket PC/Tester/Form1.cs 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/Form1.cs 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,185 @@
+// Copyright (C) 2004-2007 MySQL AB
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation
+//
+// There are special exceptions to the terms and conditions of the GPL
+// as it is applied to this software. View the full text of the
+// exception in file EXCEPTIONS in the directory of this software
+// distribution.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using MySql.Data.MySqlClient.Tests;
+using System.Reflection;
+using System.Collections;
+using System.Threading;
+
+namespace DeviceApplication1
+{
+ public partial class MainForm : Form
+ {
+ private TestRunner runner;
+ public delegate void NodeUpdater(int fixture, int test, int index);
+ public NodeUpdater updater;
+ int fixtureStart;
+ int fixtureEnd;
+ int testStart;
+ int testEnd;
+
+ public MainForm()
+ {
+ InitializeComponent();
+ LoadTests();
+ updater = new NodeUpdater(UpdateNode);
+ }
+
+ private void LoadTests()
+ {
+ runner = new TestRunner();
+ ArrayList tests = runner.LoadTests();
+ foreach (TestCollection tc in tests)
+ {
+ TreeNode fixture = testTree.Nodes.Add(tc.name);
+ fixture.Tag = tc;
+ foreach (TestMethod tm in tc.testMethods)
+ {
+ TreeNode test = fixture.Nodes.Add(tm.member.Name);
+ test.Tag = tm;
+ }
+ }
+ }
+
+ private void RunTests()
+ {
+ Thread t = new Thread(new ThreadStart(RunTestsWorker));
+ t.Start();
+ }
+
+ private void UpdateNode(int fixture, int test, int index)
+ {
+ TreeNode node;
+
+ if (test == -1)
+ node = testTree.Nodes[fixture];
+ else
+ node = testTree.Nodes[fixture].Nodes[test];
+ node.ImageIndex = index;
+ node.SelectedImageIndex = index;
+ }
+
+ private void RunTestsWorker()
+ {
+ for (int i = fixtureStart; i < fixtureEnd; i++)
+ {
+ int fixtureIndex = 1;
+
+ try
+ {
+ TestCollection tc = (TestCollection)testTree.Nodes[i].Tag;
+ runner.StartFixture(tc);
+
+ int myTestEnd = testEnd;
+ if (testEnd == -1)
+ myTestEnd = tc.testMethods.Count;
+ for (int x = testStart; x < myTestEnd; x++)
+ {
+ int index = 1;
+ if (!runner.RunTest(i, x))
+ {
+ fixtureIndex = 0;
+ index = 0;
+ }
+ this.Invoke(updater, i, x, index);
+ }
+
+ runner.EndFixture(tc);
+ }
+ catch (Exception ex)
+ {
+ fixtureIndex = 0;
+ }
+ this.Invoke(updater, i, -1, fixtureIndex);
+ }
+ }
+
+ private void showDetailsMenu_Click(object sender, EventArgs e)
+ {
+ if (testTree.SelectedNode == null)
+ MessageBox.Show("No test selected");
+ FailDetails fd = new FailDetails();
+ TreeNode node = testTree.SelectedNode;
+ if (node.Parent == null)
+ {
+ TestCollection tc = (TestCollection)node.Tag;
+ fd.Message = tc.message;
+ fd.Trace = tc.stack;
+ }
+ else
+ {
+ TestMethod tm = (TestMethod)node.Tag;
+ fd.Message = tm.message;
+ fd.Trace = tm.stack;
+ }
+ fd.ShowDialog();
+ }
+
+ private void runTestsMenu_Click(object sender, EventArgs e)
+ {
+ ResetTree();
+ fixtureStart = 0;
+ fixtureEnd = testTree.Nodes.Count;
+ testStart = 0;
+ testEnd = -1;
+ RunTests();
+ }
+
+ private void runSelected_Click(object sender, EventArgs e)
+ {
+ if (testTree.SelectedNode == null)
+ MessageBox.Show("No test selected");
+ ResetTree();
+ TreeNode selNode = testTree.SelectedNode;
+ testStart = 0;
+ testEnd = -1;
+ if (selNode.Parent != null)
+ {
+ testStart = selNode.Index;
+ testEnd = testStart + 1;
+ selNode = selNode.Parent;
+ }
+ fixtureStart = selNode.Index;
+ fixtureEnd = fixtureStart + 1;
+ RunTests();
+ }
+
+ private void ResetTree()
+ {
+ foreach (TreeNode node in testTree.Nodes)
+ {
+ node.ImageIndex = 2;
+ node.SelectedImageIndex = 2;
+ foreach (TreeNode test in node.Nodes)
+ {
+ test.ImageIndex = 2;
+ test.SelectedImageIndex = 2;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/Samples/Pocket PC/Tester/Form1.resx
===================================================================
--- trunk/Samples/Pocket PC/Tester/Form1.resx 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/Form1.resx 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>134, 17</value>
+ </metadata>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="resource" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAFpJREFUOE9j/A8E
+ DOiAkRFDCCyARSlQDAlAlBDGyFrgbGI0IquBaoS4gFTNMPUgrZQbQK7tUH0MZDt/1AB41FMhGqmSkMgx
+ BCUpwzIEsYkKa2YiJleiZF0IBwCCRi/wAJMMHQAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="resource1" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAGVJREFUOE9j/A8E
+ DGiAkUEJXQjM/89wD1McZAAMMPxX/E8MRtUD5RGjEVkNwlKQF4i0GV0d2PsQgjinYzWAXM1wfaMGABMh
+ mTGA0EdpNFKcDkjNBzCnoyRlUg3BmpmIyZXIamBsAB5jSfqm8jHwAAAAAElFTkSuQmCC
+</value>
+ </data>
+ <data name="resource2" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAACVJREFUOE9j/A8E
+ DJQAkAGUAAZKNINdP2rAaBiMpgNwLqA4LwAAlW3Aa6noFWgAAAAASUVORK5CYII=
+</value>
+ </data>
+ <metadata name="$this.FormFactorShadowProperty" xml:space="preserve">
+ <value>POCKET_PC_2003_PORTRAIT</value>
+ </metadata>
+ <metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+</root>
\ No newline at end of file
Added: trunk/Samples/Pocket PC/Tester/MySql.Data.Tests.CF.dll.config
===================================================================
--- trunk/Samples/Pocket PC/Tester/MySql.Data.Tests.CF.dll.config 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/MySql.Data.Tests.CF.dll.config 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <appSettings>
+ <add key="host" value="blackhole"/>
+ <add key="port" value="3306"/>
+ <add key="userid" value="test"/>
+ <add key="password" value="test"/>
+ <add key="database" value="test"/>
+ <add key="database1" value="test"/>
+ </appSettings>
+</configuration>
\ No newline at end of file
Added: trunk/Samples/Pocket PC/Tester/Program.cs
===================================================================
--- trunk/Samples/Pocket PC/Tester/Program.cs 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/Program.cs 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+
+namespace DeviceApplication1
+{
+ static class Program
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [MTAThread]
+ static void Main()
+ {
+ Application.Run(new MainForm());
+ }
+ }
+}
\ No newline at end of file
Added: trunk/Samples/Pocket PC/Tester/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Samples/Pocket PC/Tester/Properties/AssemblyInfo.cs 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/Properties/AssemblyInfo.cs 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("DeviceApplication1")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("DeviceApplication1")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2007")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("add8ee1a-806b-4fba-bd00-1507ed0a2087")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+
Added: trunk/Samples/Pocket PC/Tester/Properties/Resources.Designer.cs
===================================================================
--- trunk/Samples/Pocket PC/Tester/Properties/Resources.Designer.cs 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/Properties/Resources.Designer.cs 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,60 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.312
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace DeviceApplication1.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DeviceApplication1.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
Added: trunk/Samples/Pocket PC/Tester/Properties/Resources.resx
===================================================================
--- trunk/Samples/Pocket PC/Tester/Properties/Resources.resx 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/Properties/Resources.resx 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Added: trunk/Samples/Pocket PC/Tester/Properties/green.png
===================================================================
(Binary files differ)
Property changes on: trunk/Samples/Pocket PC/Tester/Properties/green.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/Samples/Pocket PC/Tester/Properties/red.png
===================================================================
(Binary files differ)
Property changes on: trunk/Samples/Pocket PC/Tester/Properties/red.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/Samples/Pocket PC/Tester/Properties/white.png
===================================================================
(Binary files differ)
Property changes on: trunk/Samples/Pocket PC/Tester/Properties/white.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/Samples/Pocket PC/Tester/Tester.csproj
===================================================================
--- trunk/Samples/Pocket PC/Tester/Tester.csproj 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/Samples/Pocket PC/Tester/Tester.csproj 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,115 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C3904AC7-1888-42CF-A3AC-7ADC1BA41704}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>DeviceApplication1</RootNamespace>
+ <AssemblyName>DeviceApplication1</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>PocketPC</PlatformFamilyName>
+ <PlatformID>3C41C503-53EF-4c2a-8DD4-A8217CAD115E</PlatformID>
+ <OSVersion>4.20</OSVersion>
+ <DeployDirSuffix>DeviceApplication1</DeployDirSuffix>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FormFactorID>
+ </FormFactorID>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;$(PlatformFamilyName)</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;$(PlatformFamilyName)</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="FailDetails.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="FailDetails.Designer.cs">
+ <DependentUpon>FailDetails.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Form1.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Form1.Designer.cs">
+ <DependentUpon>Form1.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="FailDetails.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>FailDetails.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Form1.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>Form1.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\TestSuite\MySql.Data.Tests.CF.csproj">
+ <Project>{710D9251-17A3-4429-9A91-63F03267F310}</Project>
+ <Name>MySql.Data.Tests.CF</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="MySql.Data.Tests.CF.dll.config">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+ <Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" />
+ <Import Condition="'$(TargetFrameworkVersion)' == 'v2.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: trunk/TestSuite/MySql.Data.Tests.CF.csproj
===================================================================
--- trunk/TestSuite/MySql.Data.Tests.CF.csproj 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/TestSuite/MySql.Data.Tests.CF.csproj 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,114 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{710D9251-17A3-4429-9A91-63F03267F310}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MySql.Data.Tests.CF</RootNamespace>
+ <AssemblyName>MySql.Data.Tests.CF</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>PocketPC</PlatformFamilyName>
+ <PlatformID>3C41C503-53EF-4c2a-8DD4-A8217CAD115E</PlatformID>
+ <OSVersion>4.20</OSVersion>
+ <DeployDirSuffix>MySql.Data.Tests.CF</DeployDirSuffix>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FormFactorID>
+ </FormFactorID>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;CF;NET20</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;CF;NET20</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Source\AsyncTests.cs" />
+ <Compile Include="Source\BaseTest.cs" />
+ <Compile Include="Source\BlobTests.cs" />
+ <Compile Include="Source\CharacterSetTests.cs" />
+ <Compile Include="Source\CommandBuilderTests.cs" />
+ <Compile Include="Source\CommandTests.cs" />
+ <Compile Include="Source\ConfigurationManager.cs" />
+ <Compile Include="Source\ConnectionStringBuilder.cs" />
+ <Compile Include="Source\ConnectionTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Source\CultureTests.cs" />
+ <Compile Include="Source\CursorTests.cs" />
+ <Compile Include="Source\DataAdapterTests.cs" />
+ <Compile Include="Source\DataReaderTests.cs" />
+ <Compile Include="Source\DataTypeTests.cs" />
+ <Compile Include="Source\DateTimeTests.cs" />
+ <Compile Include="Source\EventTests.cs" />
+ <Compile Include="Source\ExceptionTests.cs" />
+ <Compile Include="Source\GetSchemaTests.cs" />
+ <Compile Include="Source\InterfaceTests.cs" />
+ <Compile Include="Source\LanguageTests.cs" />
+ <Compile Include="Source\MicroPerfTests.cs" />
+ <Compile Include="Source\MySqlHelperTests.cs" />
+ <Compile Include="Source\ParameterTests.cs" />
+ <Compile Include="Source\PoolingTests.cs" />
+ <Compile Include="Source\PreparedStatements.cs" />
+ <Compile Include="Source\ProcedureParameters.cs" />
+ <Compile Include="Source\SimpleTransactions.cs" />
+ <Compile Include="Source\StoredProcedure.cs" />
+ <Compile Include="Source\StressTests.cs" />
+ <Compile Include="Source\Syntax.cs" />
+ <Compile Include="Source\Syntax2.cs" />
+ <Compile Include="Source\Tester\TestClasses.cs" />
+ <Compile Include="Source\Tester\TestRunner.cs" />
+ <Compile Include="Source\TimeoutAndCancel.cs" />
+ <Compile Include="Source\Utils.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Driver\MySql.Data.CF.csproj">
+ <Project>{587A47FB-C1CC-459D-93B6-179D95E41EFB}</Project>
+ <Name>MySql.Data.CF</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" />
+ <Import Condition="'$(TargetFrameworkVersion)' == 'v2.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: trunk/TestSuite/Source/Tester/TestClasses.cs
===================================================================
--- trunk/TestSuite/Source/Tester/TestClasses.cs 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/TestSuite/Source/Tester/TestClasses.cs 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,151 @@
+// Copyright (C) 2004-2007 MySQL AB
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation
+//
+// There are special exceptions to the terms and conditions of the GPL
+// as it is applied to this software. View the full text of the
+// exception in file EXCEPTIONS in the directory of this software
+// distribution.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NUnit.Framework
+{
+ class TestFixtureAttribute : Attribute
+ {
+ }
+
+ class TearDownAttribute : Attribute
+ {
+ }
+
+ class TestFixtureSetUpAttribute : Attribute
+ {
+ }
+
+ class TestFixtureTearDownAttribute : Attribute
+ {
+ }
+
+ class SetUpAttribute : Attribute
+ {
+ }
+
+ class TestAttribute : Attribute
+ {
+ }
+
+ class Assert
+ {
+ public static void Fail(string message)
+ {
+ throw new Exception(message);
+ }
+
+ public static void AreEqual(object expected, object value, string msg)
+ {
+ try
+ {
+ if (expected is UInt64)
+ {
+ ulong lValue = Convert.ToUInt64(value);
+ if (!expected.Equals(lValue))
+ throw new Exception(msg);
+ }
+ else
+ {
+ long iExpected = Convert.ToInt64(expected);
+ long iValue = Convert.ToInt64(value);
+ if (iExpected != iValue)
+ throw new Exception(msg);
+ }
+ }
+ catch (Exception ex)
+ {
+ if (ex is InvalidCastException ||
+ ex is FormatException)
+ {
+ if (!expected.Equals(value))
+ throw new Exception(msg);
+ }
+ else
+ throw new Exception(msg);
+ }
+
+ /* if (expected is string)
+ {
+ if (expected.ToString() != value.ToString())
+ throw new Exception(msg);
+ }
+ else if (expected is DateTime)
+ {
+ if (!expected.Equals(value))
+ throw new Exception(msg);
+ }
+ else*/
+ }
+
+ public static void AreEqual(object expected, object value)
+ {
+ AreEqual(expected, value, null);
+ }
+
+ public static void IsTrue(bool value, string msg)
+ {
+ if (!value)
+ throw new Exception(msg);
+ }
+
+ public static void IsTrue(bool value)
+ {
+ IsTrue(value, "Value should be true");
+ }
+
+ public static void IsFalse(bool value, string msg)
+ {
+ if (value)
+ throw new Exception(msg);
+ }
+
+ public static void IsFalse(bool value)
+ {
+ IsFalse(value, "Value should be false");
+ }
+
+ public static void IsNull(object value, string msg)
+ {
+ if (value != null)
+ throw new Exception(msg);
+ }
+
+ public static void IsNull(object value)
+ {
+ IsNull(value, "Should be null");
+ }
+
+ public static void IsNotNull(object value, string msg)
+ {
+ if (value == null)
+ throw new Exception(msg);
+ }
+
+ public static void IsNotNull(object value)
+ {
+ IsNotNull(value, "Should not be null");
+ }
+
+ }
+}
Added: trunk/TestSuite/Source/Tester/TestRunner.cs
===================================================================
--- trunk/TestSuite/Source/Tester/TestRunner.cs 2007-04-10 00:21:12 UTC (rev 671)
+++ trunk/TestSuite/Source/Tester/TestRunner.cs 2007-04-13 17:39:32 UTC (rev 672)
@@ -0,0 +1,200 @@
+// Copyright (C) 2004-2007 MySQL AB
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation
+//
+// There are special exceptions to the terms and conditions of the GPL
+// as it is applied to this software. View the full text of the
+// exception in file EXCEPTIONS in the directory of this software
+// distribution.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+using System;
+using System.Reflection;
+using NUnit.Framework;
+using System.Collections;
+
+namespace MySql.Data.MySqlClient.Tests
+{
+ public class TestRunner
+ {
+ private ArrayList tests = new ArrayList();
+
+ public event EventHandler FixtureStarted;
+ public event EventHandler FixtureDone;
+ public event EventHandler TestStarted;
+ public event EventHandler TestDone;
+
+ public ArrayList LoadTests()
+ {
+ Assembly me = Assembly.GetExecutingAssembly();
+
+ Type[] types = me.GetTypes();
+
+ foreach (Type t in types)
+ {
+ object[] o = t.GetCustomAttributes(typeof(TestFixtureAttribute), false);
+ if (o == null || o.Length == 0) continue;
+
+ TestCollection tc = new TestCollection();
+ tc.name = t.Name;
+ tc.fixtureType = t;
+
+ FindMethods(t, tc);
+ if (tc.testMethods.Count > 0)
+ tests.Add(tc);
+ }
+ return tests;
+ }
+
+ private void FindMethods(Type t, TestCollection tc)
+ {
+ // now get all the methods on the fixture
+ MethodInfo[] methods = t.GetMethods(
+ BindingFlags.Public | BindingFlags.NonPublic |
+ BindingFlags.Instance);
+
+ // if there is a fixture setup routine, invoke it
+ foreach (MethodInfo mi in methods)
+ {
+ if (mi.IsPrivate) continue;
+
+ object[] attr = mi.GetCustomAttributes(true);
+
+ foreach (Attribute a in attr)
+ {
+ if (a is TestFixtureSetUpAttribute)
+ tc.classSetup = mi;
+ else if (a is TestFixtureTearDownAttribute)
+ tc.classTeardown = mi;
+ else if (a is SetUpAttribute)
+ tc.setup = mi;
+ else if (a is TearDownAttribute)
+ tc.tearDown = mi;
+ else if (a is TestAttribute)
+ {
+ TestMethod tm = new TestMethod();
+ tm.member = mi;
+ tc.testMethods.Add(tm);
+ }
+ }
+ }
+ }
+
+ public void StartFixture(TestCollection tc)
+ {
+ try
+ {
+ if (tc.fixture == null)
+ tc.fixture = Activator.CreateInstance(tc.fixtureType);
+
+ if (tc.classSetup != null)
+ tc.classSetup.Invoke(tc.fixture, null);
+ }
+ catch (Exception ex)
+ {
+ tc.message = ex.Message;
+ tc.stack = ex.StackTrace;
+ throw;
+ }
+ }
+
+ public void EndFixture(TestCollection tc)
+ {
+ try
+ {
+ if (tc.classTeardown != null)
+ tc.classTeardown.Invoke(tc.fixture, null);
+ }
+ catch (Exception ex)
+ {
+ tc.message = ex.Message;
+ tc.stack = ex.StackTrace;
+ throw;
+ }
+ }
+
+ public bool RunTest(int fixtureIndex, int methodIndex)
+ {
+ TestCollection tc = (TestCollection)tests[fixtureIndex];
+ TestMethod tm = (TestMethod)tc.testMethods[methodIndex];
+ try
+ {
+ if (tc.setup != null)
+ tc.setup.Invoke(tc.fixture, null);
+
+ tm.member.Invoke(tc.fixture, null);
+
+ if (tc.tearDown != null)
+ tc.tearDown.Invoke(tc.fixture, null);
+
+ return true;
+ }
+ catch (Exception ex)
+ {
+ tm.message = ex.Message;
+ tm.stack = ex.StackTrace;
+ return false;
+ }
+ }
+
+ private void OnTestDone()
+ {
+ if (TestDone != null)
+ TestDone(this, null);
+ }
+
+ private void OnTestStarted()
+ {
+ if (TestStarted != null)
+ TestStarted(this, null);
+ }
+
+ private void OnFixtureStated()
+ {
+ if (FixtureStarted != null)
+ FixtureStarted(this, null);
+ }
+
+ private void OnFixtureDone()
+ {
+ if (FixtureDone != null)
+ FixtureDone(this, null);
+ }
+ }
+
+ public class TestCollection
+ {
+ public string name;
+ public ArrayList testMethods;
+ public MethodInfo classSetup;
+ public MethodInfo classTeardown;
+ public MethodInfo setup;
+ public MethodInfo tearDown;
+ public object fixture;
+ public Type fixtureType;
+ public string message;
+ public string stack;
+
+ public TestCollection()
+ {
+ testMethods = new ArrayList();
+ }
+ }
+
+ public class TestMethod
+ {
+ public MethodInfo member;
+ public string message;
+ public string stack;
+ }
+}
| Thread |
|---|
| • Connector/NET commit: r672 - in trunk: Samples/Pocket PC Samples/Pocket PC/Tester Samples/Pocket PC/Tester/Properties TestSuite TestSuite/Source TestS... | rburnett | 13 Apr |