public void ShouldSetKeyColumnName()
        {
            var target = MockRepository.GenerateMock <IManyToOnePart>();

            target.Stub(x => x.Property)
            .Return(new DummyPropertyInfo("Example", typeof(ExampleClass)));

            convention.Apply(target);

            target.AssertWasCalled(x => x.ColumnName("Example_id"));
        }
        public void ShouldSetKeyColumnName()
        {
            var target = MockRepository.GenerateMock <IManyToManyPart>();

            target.Stub(x => x.ChildType)
            .Return(typeof(ExampleClass));

            convention.Apply(target);

            target.AssertWasCalled(x => x.WithChildKeyColumn("ExampleClass_id"));
        }
        public void ShouldSetKeyColumnName()
        {
            var target      = MockRepository.GenerateStub <IOneToManyPart>();
            var columnNames = MockRepository.GenerateMock <IColumnNameCollection>();

            target.Stub(x => x.KeyColumnNames)
            .Return(columnNames);
            target.Stub(x => x.EntityType)
            .Return(typeof(ExampleClass));

            convention.Apply(target);

            columnNames.AssertWasCalled(x => x.Add("ExampleClass_id"));
        }