0

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?

Coppermill
  • 6,676
  • 14
  • 67
  • 92

1 Answers1

1

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
  • 6,676
  • 14
  • 67
  • 92