public void Apply() { Mock<ITypePropertyConventionContext> contextMock = new Mock<ITypePropertyConventionContext>(); var target = new RandomBooleanConvention(); target.Apply(contextMock.Object); contextMock.Verify( a => a.SetSource<RandomBooleanDataSource>(), @" The SetSource method was not called on the TypePropertyConvenctionContext object. This has to happen in order for the convention to work. "); }