views:

20

answers:

2

I have generated a LinqtoSQL mapping xml file, which I have a valid XSD schema that I check to make sure the XML is correct.

Now I want to check that the field type match the Model/Interface

for example:

checking that the nullable fields are nullable that int are int etc

anyone got any ideas if I can do this?

A: 

I'm afraid you'll need to hand-roll your own code here.

Steven
A: 

One way I have found is to just pass in a new object without setting anything:

[Test]
[Rollback]
public void Should_take_a_Document_with_nulls()
{
// Arrange
var repository = GetRepository();
var contact = new Contact();

// Act
repository.Save(contact);

// Assert
}
Coppermill