Commit 1ea4eb82 authored by Sam Saffron's avatar Sam Saffron

another test

parent 5d9e188b
......@@ -81,12 +81,6 @@
<LastGenOutput>DataClasses.designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</None>
<None Include="nhibernate\nhibernate-configuration.xsd">
<SubType>Designer</SubType>
</None>
<None Include="nhibernate\nhibernate-mapping.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
......@@ -100,14 +94,6 @@
<DependentUpon>DataClasses.dbml</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="nhibernate\Iesi.Collections.dll" />
<Content Include="nhibernate\Iesi.Collections.pdb" />
<Content Include="nhibernate\Iesi.Collections.xml" />
<Content Include="nhibernate\NHibernate.dll" />
<Content Include="nhibernate\NHibernate.pdb" />
<Content Include="nhibernate\NHibernate.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.
......
......@@ -16,6 +16,14 @@ void AssertEquals(object a, object b)
}
}
void AssertNull(object a)
{
if (a != null)
{
throw new ApplicationException(string.Format("{0} should be null", a));
}
}
SqlConnection connection = Program.GetOpenConnection();
......@@ -36,5 +44,24 @@ public void PassInIntArray()
AssertEquals(items[1], 2);
AssertEquals(items[2], 3);
}
public class Dog
{
public int? Age { get; set; }
public Guid Id { get; set; }
public string Name { get; set; }
public float? Weight { get; set; }
public int IgnoredProperty { get { return 1; } }
}
public void TestIntSupportsNull()
{
var dog = connection.ExecuteMapperQuery<Dog>("select Age = @Age", new { Age = (int?)null });
AssertEquals(dog.Count(), 1);
AssertNull(dog.First().Age);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment