protected IBusinessObjectProperty CreatePropertyStub(IBusinessObjectClass classStub, string propertyIdentifier) { var propertyStub = MockRepository.GenerateStub <IBusinessObjectProperty>(); propertyStub.Stub(_ => _.Identifier).Return(propertyIdentifier); classStub.Stub(_ => _.GetPropertyDefinition(propertyIdentifier)).Return(propertyStub); return(propertyStub); }
public void SetUp() { _dataSourceBusinessObjectClassStub = MockRepository.GenerateStub <IBusinessObjectClass>(); _dataSourceBusinessObjectClassStub.Stub(stub => stub.Identifier).Return("DataSourceBusinessObjectClass"); _dataSourceStub = MockRepository.GenerateStub <IBusinessObjectDataSource>(); _dataSourceStub.Stub(stub => stub.BusinessObjectClass).Return(_dataSourceBusinessObjectClassStub); _businessObjectBusinessObjectClassStub = MockRepository.GenerateStub <IBusinessObjectClass>(); _businessObjectBusinessObjectClassStub.Stub(stub => stub.Identifier).Return("BusinessObjectBusinessObjectClass"); _businessObjectStub = MockRepository.GenerateStub <IBusinessObject>(); _businessObjectStub.Stub(stub => stub.BusinessObjectClass).Return(_businessObjectBusinessObjectClassStub); _businessObjectWithIdentityStub = MockRepository.GenerateStub <IBusinessObjectWithIdentity>(); _businessObjectWithIdentityStub.Stub(stub => stub.UniqueIdentifier).Return("BusinessObjectIdentifier"); _propertyStub = MockRepository.GenerateStub <IBusinessObjectProperty>(); _propertyStub.Stub(stub => stub.Identifier).Return("BusinessObjectProperty"); }