[Monodevelop-patches-list] r1966 - in trunk/MSBuild/Test: . Microsoft.Build.Framework.Test Microsoft.Build.Framework.Test/Properties

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Sep 26 09:37:26 EDT 2004


Author: rtillie
Date: 2004-09-26 09:37:26 -0400 (Sun, 26 Sep 2004)
New Revision: 1966

Added:
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/EventArgsTest.cs
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Microsoft.Build.Framework.Test.csproj
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Microsoft.Build.Framework.Test.csproj.user
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/AssemblyInfo.cs
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Resources.cs
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Resources.resx
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Settings.cs
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Settings.settings
   trunk/MSBuild/Test/Microsoft.Build.Framework.Test/app.config
Log:
Framework dll tests

Added: trunk/MSBuild/Test/Microsoft.Build.Framework.Test/EventArgsTest.cs
===================================================================
--- trunk/MSBuild/Test/Microsoft.Build.Framework.Test/EventArgsTest.cs	2004-09-26 13:35:47 UTC (rev 1965)
+++ trunk/MSBuild/Test/Microsoft.Build.Framework.Test/EventArgsTest.cs	2004-09-26 13:37:26 UTC (rev 1966)
@@ -0,0 +1,91 @@
+using System;
+using NUnit.Framework;
+using Microsoft.Build.Framework;
+
+namespace Microsoft.Build.Framework.Test {
+	
+	[TestFixture]
+	public class EventArgsTest {
+
+		private BuildEventArgs e;
+		private BuildStatusEventArgs be;
+		private TaskEventArgs te;
+
+		[SetUp]
+		public void Init () 
+		{
+			e = new BuildEventArgs ();
+			be = new BuildStatusEventArgs ();
+			te = new TaskEventArgs ();
+		}
+
+		[TearDown]
+		public void CleanUp () 
+		{
+			
+		}
+		
+		[Test]
+		public void BuildEventArgsTest ()
+		{
+			// the timestamp should be set to DateTime.Now
+			Assert.AreEqual (DateTime.Now.Day, e.TimeStamp.Day, "VAL#01");
+			Assert.AreEqual (0, e.Processor, "VAL#02");
+			Assert.AreEqual (BuildEventCategory.Comment, e.Category, "VAL#03");
+			Assert.IsNull (e.SubCategory, "VAL#04");
+			Assert.AreEqual (BuildEventImportance.Low, e.Importance, "VAL#05");
+			Assert.IsNull (e.Code, "VAL#06");
+			Assert.IsNull (e.File, "VAL#07");
+			Assert.AreEqual (0, e.LineNumber, "VAL#08");
+			Assert.AreEqual (0, e.ColumnNumber, "VAL#09");
+			Assert.AreEqual (0, e.EndLineNumber, "VAL#10");
+			Assert.AreEqual (0, e.EndColumnNumber, "VAL#11");
+			Assert.IsNull (e.Message, "VAL#12");
+			Assert.IsNull (e.HelpKeyword, "VAL#13");
+		}
+
+		[Test]
+		public void BuildStatusEventArgsTest ()
+		{
+			// Include these again because the inheriter could change these in the constructor.
+			Assert.AreEqual (DateTime.Now.Day, be.TimeStamp.Day, "BSE#01");
+			Assert.AreEqual (0, be.Processor, "BSE#02");
+			Assert.AreEqual (BuildEventCategory.Custom, be.Category, "BSE#03");
+			Assert.IsNull (be.SubCategory, "BSE#04");
+			Assert.AreEqual (BuildEventImportance.Normal, be.Importance, "BSE#05");
+			Assert.IsNull (be.Code, "BSE#06");
+			Assert.IsNull (be.File, "BSE#07");
+			Assert.AreEqual (0, be.LineNumber, "BSE#08");
+			Assert.AreEqual (0, be.ColumnNumber, "BSE#09");
+			Assert.AreEqual (0, be.EndLineNumber, "BSE#10");
+			Assert.AreEqual (0, be.EndColumnNumber, "BSE#11");
+			Assert.IsNull (be.Message, "BSE#12");
+			Assert.IsNull (be.HelpKeyword, "BSE#13");
+
+			Assert.AreEqual (false, be.IsStageSuccessfullyFinished, "BSE#14");
+			Assert.AreEqual (null, be.StageName, "BSE#15");
+			Assert.AreEqual (BuildStage.NotBuilding, be.Stage, "BSE#16");
+		}
+
+		[Test]
+		public void TaskEventArgsTest ()
+		{
+			// Include these again because the inheriter could change these in the constructor.
+			Assert.AreEqual (DateTime.Now.Day, te.TimeStamp.Day, "TEA#01");
+			Assert.AreEqual (0, te.Processor, "TEA#02");
+			Assert.AreEqual (BuildEventCategory.Comment, te.Category, "TEA#03");
+			Assert.IsNull (te.SubCategory, "TEA#04");
+			Assert.AreEqual (BuildEventImportance.Low, te.Importance, "TEA#05");
+			Assert.IsNull (te.Code, "TEA#06");
+			Assert.IsNull (te.File, "TEA#07");
+			Assert.AreEqual (0, te.LineNumber, "TEA#08");
+			Assert.AreEqual (0, te.ColumnNumber, "TEA#09");
+			Assert.AreEqual (0, te.EndLineNumber, "TEA#10");
+			Assert.AreEqual (0, te.EndColumnNumber, "TEA#11");
+			Assert.IsNull (te.Message, "TEA#12");
+			Assert.IsNull (te.HelpKeyword, "TEA#13");
+
+			Assert.IsNull (te.TaskName, "TEA#14");
+		}
+	}
+}

Added: trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Microsoft.Build.Framework.Test.csproj
===================================================================
--- trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Microsoft.Build.Framework.Test.csproj	2004-09-26 13:35:47 UTC (rev 1965)
+++ trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Microsoft.Build.Framework.Test.csproj	2004-09-26 13:37:26 UTC (rev 1966)
@@ -0,0 +1,63 @@
+<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.40607</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{59BBCB69-B871-4ED4-96E8-E46D4402BEF0}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <RootNamespace>Microsoft.Build.Framework.Test</RootNamespace>
+    <AssemblyName>Microsoft.Build.Framework.Test</AssemblyName>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>.\bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugSymbols>false</DebugSymbols>
+    <Optimize>true</Optimize>
+    <OutputPath>.\bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="nunit.framework, Version=2.1.4.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="EventArgsTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.cs</LastGenOutput>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
+    </Compile>
+    <None Include="app.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+    </Compile>
+    <AppDesigner Include="Properties\" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework.csproj">
+      <Project>{D3A341EA-8592-4653-921D-05471DDC98AD}</Project>
+      <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+      <Name>Microsoft.Build.Framework</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
+</Project>
\ No newline at end of file

Added: trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Microsoft.Build.Framework.Test.csproj.user
===================================================================
--- trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Microsoft.Build.Framework.Test.csproj.user	2004-09-26 13:35:47 UTC (rev 1965)
+++ trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Microsoft.Build.Framework.Test.csproj.user	2004-09-26 13:37:26 UTC (rev 1966)
@@ -0,0 +1,7 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Condition="">
+    <LastOpenVersion>8.0.40607</LastOpenVersion>
+    <ProjectView>ProjectFiles</ProjectView>
+    <ProjectTrust>0</ProjectTrust>
+  </PropertyGroup>
+</Project>
\ No newline at end of file

Added: trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/AssemblyInfo.cs
===================================================================
--- trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/AssemblyInfo.cs	2004-09-26 13:35:47 UTC (rev 1965)
+++ trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/AssemblyInfo.cs	2004-09-26 13:37:26 UTC (rev 1966)
@@ -0,0 +1,29 @@
+#region Using directives
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+#endregion
+
+// 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("Microsoft_Build_Framework_Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Microsoft_Build_Framework_Test")]
+[assembly: AssemblyCopyright("Copyright @  2004")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.*")]

Added: trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Resources.cs
===================================================================
--- trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Resources.cs	2004-09-26 13:35:47 UTC (rev 1965)
+++ trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Resources.cs	2004-09-26 13:37:26 UTC (rev 1966)
@@ -0,0 +1,61 @@
+//------------------------------------------------------------------------------
+// <autogenerated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.40607.16
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </autogenerated>
+//------------------------------------------------------------------------------
+
+namespace Microsoft.Build.Framework.Test.Properties {
+    using System;
+    using System.IO;
+    using System.Resources;
+    
+    
+    /// <summary>
+    ///    A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the Strongly Typed Resource Builder
+    // class via a tool like ResGen or Visual Studio.NET.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    class Resources {
+        
+        private static System.Resources.ResourceManager _resMgr;
+        
+        private static System.Globalization.CultureInfo _resCulture;
+        
+        /*FamANDAssem*/ internal Resources() {
+        }
+        
+        /// <summary>
+        ///    Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static System.Resources.ResourceManager ResourceManager {
+            get {
+                if ((_resMgr == null)) {
+                    System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Microsoft.Build.Framework.Test.Properties.Resources", typeof(Resources).Assembly);
+                    _resMgr = temp;
+                }
+                return _resMgr;
+            }
+        }
+        
+        /// <summary>
+        ///    Overrides the current thread's CurrentUICulture property for all
+        ///    resource lookups using this strongly typed resource class.
+        /// </summary>
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static System.Globalization.CultureInfo Culture {
+            get {
+                return _resCulture;
+            }
+            set {
+                _resCulture = value;
+            }
+        }
+    }
+}

Added: trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Resources.resx
===================================================================
--- trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Resources.resx	2004-09-26 13:35:47 UTC (rev 1965)
+++ trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Resources.resx	2004-09-26 13:37:26 UTC (rev 1966)
@@ -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/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Settings.cs
===================================================================
--- trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Settings.cs	2004-09-26 13:35:47 UTC (rev 1965)
+++ trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Settings.cs	2004-09-26 13:37:26 UTC (rev 1966)
@@ -0,0 +1,38 @@
+//------------------------------------------------------------------------------
+// <autogenerated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.40607.16
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </autogenerated>
+//------------------------------------------------------------------------------
+
+namespace Microsoft.Build.Framework.Test.Properties {
+    
+    
+    sealed partial class Settings : System.Configuration.ApplicationSettingsBase {
+        
+        private static Settings m_Value;
+        
+        private static object m_SyncObject = new object();
+        
+        [System.Diagnostics.DebuggerNonUserCode()]
+        public static Settings Value {
+            get {
+                if ((Settings.m_Value == null)) {
+                    System.Threading.Monitor.Enter(Settings.m_SyncObject);
+                    if ((Settings.m_Value == null)) {
+                        try {
+                            Settings.m_Value = new Settings();
+                        }
+                        finally {
+                            System.Threading.Monitor.Exit(Settings.m_SyncObject);
+                        }
+                    }
+                }
+                return Settings.m_Value;
+            }
+        }
+    }
+}

Added: trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Settings.settings
===================================================================
--- trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Settings.settings	2004-09-26 13:35:47 UTC (rev 1965)
+++ trunk/MSBuild/Test/Microsoft.Build.Framework.Test/Properties/Settings.settings	2004-09-26 13:37:26 UTC (rev 1966)
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='iso-8859-1'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)" GeneratedClassNamespace="Microsoft.Build.Framework.Test.Properties" GeneratedClassName="Settings">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>
\ No newline at end of file

Added: trunk/MSBuild/Test/Microsoft.Build.Framework.Test/app.config
===================================================================
--- trunk/MSBuild/Test/Microsoft.Build.Framework.Test/app.config	2004-09-26 13:35:47 UTC (rev 1965)
+++ trunk/MSBuild/Test/Microsoft.Build.Framework.Test/app.config	2004-09-26 13:37:26 UTC (rev 1966)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+	<startup>
+		<supportedRuntime version="v2.0.40607" />
+		<supportedRuntime version="v1.1.4322" />
+		<supportedRuntime version="v1.0.3705" />
+
+		<requiredRuntime version="v1.1.4322" />
+	</startup> 
+</configuration>
\ No newline at end of file




More information about the Monodevelop-patches-list mailing list