public void SetUp() { _referencedDataSourceStub = MockRepository.GenerateStub <IBusinessObjectDataSource>(); _referencedDataSourceStub.BusinessObject = MockRepository.GenerateStub <IBusinessObject>(); _referencedDataSourceStub.Stub(_ => _.BusinessObjectClass).Return(MockRepository.GenerateStub <IBusinessObjectClass>()); _referencePropertyStub = MockRepository.GenerateStub <IBusinessObjectReferenceProperty> (); _referencePropertyStub.Stub(_ => _.ReflectedClass).Return(MockRepository.GenerateStub <IBusinessObjectClass>()); }
public void SetUp() { _businessObjectStub = MockRepository.GenerateStub <IBusinessObject>(); _businessObjectClassStub = MockRepository.GenerateStub <IBusinessObjectClass>(); _dataSourceStub = MockRepository.GenerateStub <IBusinessObjectDataSource>(); _dataSourceStub.BusinessObject = _businessObjectStub; _dataSourceStub.Mode = DataSourceMode.Edit; _dataSourceStub.Stub(_ => _.BusinessObjectClass).Return(_businessObjectClassStub); _propertyStub = MockRepository.GenerateStub <IBusinessObjectProperty>(); _propertyStub.Stub(_ => _.ReflectedClass).Return(_businessObjectClassStub); _readOnlyPropertyStub = MockRepository.GenerateStub <IBusinessObjectProperty>(); _readOnlyPropertyStub.Stub(_ => _.ReflectedClass).Return(_businessObjectClassStub); _readOnlyPropertyStub.Stub(stub => stub.IsReadOnly(Arg <IBusinessObject> .Is.Anything)).Return(true); _control = new TestableBusinessObjectBoundEditableWebControl(); }
public void SetUp() { _referencedDataSourceStub = MockRepository.GenerateStub <IBusinessObjectDataSource>(); _referencedDataSourceStub.BusinessObject = MockRepository.GenerateStub <IBusinessObject>(); _referencedDataSourceStub.Stub(_ => _.BusinessObjectClass).Return(MockRepository.GenerateStub <IBusinessObjectClass>()); _referencedDataSourceStub.Mode = DataSourceMode.Edit; _referencePropertyStub = MockRepository.GenerateStub <IBusinessObjectReferenceProperty>(); _referencePropertyStub.Stub(_ => _.ReflectedClass).Return(MockRepository.GenerateStub <IBusinessObjectClass>()); _referencePropertyStub.Stub(stub => stub.ReferenceClass).Return(MockRepository.GenerateStub <IBusinessObjectClass>()); _readOnlyReferencePropertyStub = MockRepository.GenerateStub <IBusinessObjectReferenceProperty>(); _readOnlyReferencePropertyStub.Stub(_ => _.ReflectedClass).Return(MockRepository.GenerateStub <IBusinessObjectClass>()); _readOnlyReferencePropertyStub.Stub(stub => stub.ReferenceClass).Return(MockRepository.GenerateStub <IBusinessObjectClass>()); _readOnlyReferencePropertyStub .Stub(stub => stub.IsReadOnly(Arg <IBusinessObject> .Is.Anything)) .Return(true); }
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"); }