public void GetPropertyInformation_GivenValideInfo_ReturnsData() { var nHibernateInformationService = new NHibernateInformationService ( SessionFactory ); var dbInfo = nHibernateInformationService.GetPropertyDatabaseInformation ( typeof(Patient), "Name.First" ); Assert.IsFalse(string.IsNullOrWhiteSpace(dbInfo.Table)); Assert.IsFalse(string.IsNullOrWhiteSpace(dbInfo.Column)); Assert.IsFalse(string.IsNullOrWhiteSpace(dbInfo.DataType)); }
public void GetPropertyInformation_GivenWhitespacePropertyName_ThrowsArgumentException() { var nHibernateInformationService = new NHibernateInformationService(SessionFactory); nHibernateInformationService.GetPropertyDatabaseInformation(typeof(Patient), " "); }
public void GetPropertyInformation_GivenNullEntity_ThrowsArgumentException() { var nHibernateInformationService = new NHibernateInformationService(SessionFactory); nHibernateInformationService.GetPropertyDatabaseInformation(null, "Name"); }