Beispiel #1
0
        public void Non_nullability_can_be_specified_on_both_navigations()
        {
            var modelBuilder = CreateModelBuilder();
            var model        = (Model)modelBuilder.Model;

            modelBuilder.Entity <BlogDetails>().HasOne(b => b.Blog).WithOne(b => b.BlogDetails);

            var logEntry = ListLoggerFactory.Log.Single();

            Assert.Equal(LogLevel.Debug, logEntry.Level);
            Assert.Equal(
                CoreResources.LogNonNullableReferenceOnBothNavigations(new TestLogger <TestLoggingDefinitions>()).GenerateMessage(
                    nameof(Blog), nameof(Blog.BlogDetails), nameof(BlogDetails), nameof(BlogDetails.Blog)), logEntry.Message);
        }