Example #1
0
        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));
        }
Example #2
0
        public void GetPropertyInformation_GivenWhitespacePropertyName_ThrowsArgumentException()
        {
            var nHibernateInformationService = new NHibernateInformationService(SessionFactory);

            nHibernateInformationService.GetPropertyDatabaseInformation(typeof(Patient), "   ");
        }
Example #3
0
        public void GetPropertyInformation_GivenNullEntity_ThrowsArgumentException()
        {
            var nHibernateInformationService = new NHibernateInformationService(SessionFactory);

            nHibernateInformationService.GetPropertyDatabaseInformation(null, "Name");
        }