Skip to content

Commit

Permalink
Integrated Simple.NExtLib into solution
Browse files Browse the repository at this point in the history
  • Loading branch information
markrendle committed Nov 10, 2010
1 parent 3d32bf7 commit f149164
Show file tree
Hide file tree
Showing 47 changed files with 2,120 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Simple.Data.sln
Expand Up @@ -40,6 +40,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simple.Data.SqlCe35Test", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simple.Data.SqlServer", "Simple.Data.SqlServer\Simple.Data.SqlServer.csproj", "{E24F1C0F-3DCD-4BE5-9A6E-78EF6CB392A1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simple.NExtLib", "Simple.NExtLib\Simple.NExtLib.csproj", "{4A191FAD-DC1D-46FC-A941-7DEB2C8C4C15}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simple.NExtLib.Unit", "Simple.NExtLib.Unit\Simple.NExtLib.Unit.csproj", "{072F8BE4-81C1-4276-A9A5-1AEC87A84265}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simple.NExtLib.Tests", "Simple.NExtLib.Tests\Simple.NExtLib.Tests.csproj", "{8DF17038-537D-45BE-B229-C99EECBB4EDC}"
EndProject
Global
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = Simple.Data.vsmdi
Expand Down Expand Up @@ -91,6 +97,18 @@ Global
{E24F1C0F-3DCD-4BE5-9A6E-78EF6CB392A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E24F1C0F-3DCD-4BE5-9A6E-78EF6CB392A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E24F1C0F-3DCD-4BE5-9A6E-78EF6CB392A1}.Release|Any CPU.Build.0 = Release|Any CPU
{4A191FAD-DC1D-46FC-A941-7DEB2C8C4C15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A191FAD-DC1D-46FC-A941-7DEB2C8C4C15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A191FAD-DC1D-46FC-A941-7DEB2C8C4C15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A191FAD-DC1D-46FC-A941-7DEB2C8C4C15}.Release|Any CPU.Build.0 = Release|Any CPU
{072F8BE4-81C1-4276-A9A5-1AEC87A84265}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{072F8BE4-81C1-4276-A9A5-1AEC87A84265}.Debug|Any CPU.Build.0 = Debug|Any CPU
{072F8BE4-81C1-4276-A9A5-1AEC87A84265}.Release|Any CPU.ActiveCfg = Release|Any CPU
{072F8BE4-81C1-4276-A9A5-1AEC87A84265}.Release|Any CPU.Build.0 = Release|Any CPU
{8DF17038-537D-45BE-B229-C99EECBB4EDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DF17038-537D-45BE-B229-C99EECBB4EDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DF17038-537D-45BE-B229-C99EECBB4EDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DF17038-537D-45BE-B229-C99EECBB4EDC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -102,5 +120,6 @@ Global
{70536BA8-AF0D-46F3-B04C-45177F56B320} = {182AEEFE-9B89-4264-BCED-91A00D1EF896}
{D4FE470E-4B01-4120-B809-F426A0179191} = {182AEEFE-9B89-4264-BCED-91A00D1EF896}
{29BBCAE1-DF13-40A0-A412-F2F87F4E9351} = {182AEEFE-9B89-4264-BCED-91A00D1EF896}
{8DF17038-537D-45BE-B229-C99EECBB4EDC} = {182AEEFE-9B89-4264-BCED-91A00D1EF896}
EndGlobalSection
EndGlobal
20 changes: 20 additions & 0 deletions Simple.NExtLib.Tests/DateTimeExtensionsTests.cs
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace Simple.NExtLib.Tests
{
[TestFixture]
public class DateTimeExtensionsTests : AssertionHelper
{
[Test]
public void ToIso8601String_formats_dates_correctly()
{
var date = new DateTime(2010, 2, 17, 13, 12, 34, 0, DateTimeKind.Utc);

Assert.That(date.ToIso8601String(), Is.EqualTo("2010-02-17T13:12:34.0000000Z"));
}
}
}
25 changes: 25 additions & 0 deletions Simple.NExtLib.Tests/Linq/EnumerableExtensionTests.cs
@@ -0,0 +1,25 @@
using System.Collections.Generic;
using NExtLib.Unit;
using NUnit.Framework;
using Simple.NExtLib.Linq;

namespace Simple.NExtLib.Tests.Linq
{
[TestFixture]
public class EnumerableExtensionTests
{
private readonly IEnumerable<string> TestList = new List<string> { "Foo", "Bar", "Quux" };

[Test]
public void TestWithIndex()
{
int expectedIndex = 0;

foreach (var item in TestList.WithIndex())
{
item.Item2.ShouldEqual(expectedIndex);
expectedIndex++;
}
}
}
}
36 changes: 36 additions & 0 deletions Simple.NExtLib.Tests/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
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("NExtLib.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NExtLib.Tests")]
[assembly: AssemblyCopyright("Copyright © Mark Rendle 2010")]
[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("fc845d30-b32d-4e62-86c8-0999a399e720")]

// 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 Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
138 changes: 138 additions & 0 deletions Simple.NExtLib.Tests/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

134 changes: 134 additions & 0 deletions Simple.NExtLib.Tests/Properties/Resources.resx
@@ -0,0 +1,134 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="TwitterStatusesSample" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TwitterStatusesSample.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="XmlWithDefaultNamespace" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\XmlWithDefaultNamespace.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="XmlWithNoNamespace" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\XmlWithNoNamespace.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="XmlWithPrefixedNamespace" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\XmlWithPrefixedNamespace.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root>

0 comments on commit f149164

Please sign in to comment.