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); }
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); }
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>))); }
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); }
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); }