示例#1
0
        public void DbContext_ShouldCreate_ValidInstanceOf_RatingsAsVirtualProp()
        {
            // Arrange
            var db           = new SportSquareDbContext();
            var propertyName = "Ratings";
            var binding      = BindingFlags.Public | BindingFlags.Instance;

            // Act
            var ratingProperty = db.GetType().GetProperty(propertyName, binding);

            Assert.That(ratingProperty.GetGetMethod().IsVirtual, Is.True);
        }
示例#2
0
        public void DbContext_ShouldCreate_ValidInstanceOf_UserWishVenues()
        {
            // Arrange
            var db           = new SportSquareDbContext();
            var propertyName = "UserWishVenues";
            var binding      = BindingFlags.Public | BindingFlags.Instance;

            // Act
            var userWishVenuesProperty = db.GetType().GetProperty(propertyName, binding);

            Assert.That(userWishVenuesProperty, Is.Not.Null);
        }
示例#3
0
        public void DbContext_ShouldCreate_ValidInstanceOf_VenuesAsVirtualProp_OfTypeIDbSetVenues()
        {
            // Arrange
            var db           = new SportSquareDbContext();
            var propertyName = "Venues";
            var binding      = BindingFlags.Public | BindingFlags.Instance;

            // Act
            var venuesProperty = db.GetType().GetProperty(propertyName, binding);

            // Assert
            Assert.That(venuesProperty.PropertyType, Is.EqualTo(typeof(IDbSet <Venue>)));
        }
示例#4
0
        public void DbContext_ShouldCreate_ValidInstanceOf_CommentsAsVirtualProp()
        {
            // Arrange
            var db           = new SportSquareDbContext();
            var propertyName = "Comments";
            var binding      = BindingFlags.Public | BindingFlags.Instance;

            // Act
            var userFavoriteVenuesProperty = db.GetType().GetProperty(propertyName, binding);

            // Assert
            Assert.That(userFavoriteVenuesProperty.GetGetMethod().IsVirtual, Is.True);
        }
示例#5
0
        public void DbContext_ShouldCreate_ValidInstanceOf_Ratings()
        {
            // Arrange
            var db           = new SportSquareDbContext();
            var propertyName = "Ratings";
            var binding      = BindingFlags.Public | BindingFlags.Instance;

            // Act
            var ratingProperty = db.GetType().GetProperty(propertyName, binding);

            // Assert
            Assert.That(ratingProperty, Is.Not.Null);
        }