I'm following examples in Professional.Test.Driven.Development.with.Csharp I'm converting the code from C# into VB. (this example is the start of chapter 7)
Now having
Public Class ItemType
   Public Overridable Property Id As Integer
End Class
Public Interface IItemTypeRepository
    Function Save(ItemType As ItemType) As Integer
End Interface
Public Class ItemTypeRepository
  Implements IItemTypeRepository
Public Function Save(ItemType As ItemType) As Integer Implements IItemTypeRepository.Save
    Throw New NotImplementedException
End Function
End Class
And in the TestUnit project
<TestFixture>
Public Class Specification
   Inherits SpecBase
End Class
When writing the test in vb.net (should fail) it passes nicely (integer value of 0 = 0)
Public Class when_working_with_the_item_type_repository
   Inherits Specification
End Class
Public Class and_saving_a_valid_item_type
   Inherits when_working_with_the_item_type_repository
   Private _result As Integer
   Private _itemTypeRepository As IItemTypeRepository
   Private _testItemType As ItemType
   Private _itemTypeId As Integer
   Protected Overrides Sub Because_of()
       _result = _itemTypeRepository.Save(_testItemType)
   End Sub
   <Test>
   Public Sub then_a_valid_item_type_id_should_be_returned()
       _result.ShouldEqual(_itemTypeId)
   End Sub
End Clas
Just for reference same code in C#. Test fails
using NBehave.Spec.NUnit;
using NUnit.Framework;
using OSIM.Core;
namespace CSharpOSIM.UnitTests.OSIM.Core
{
    public class when_working_with_the_item_type_repository : Specification
{
}
    public class and_saving_a_valid_item_type : when_working_with_the_item_type_repository
        {
        private int _result;
        private IItemTypeRepository _itemTypeRepository;
        private ItemType _testItemType;
        private int _itemTypeId;
        protected override void Because_of()
        {
            _result = _itemTypeRepository.Save(_testItemType);
        }
        [Test]
        public void then_a_valid_item_type_id_should_be_returned()
        {
            _result.ShouldEqual(_itemTypeId);
        }
    }
}
Test fails on this line:
_result = _itemTypeRepository.Save(_testItemType);
Object reference not set to an instance of an object.
 
     
    