コード例 #1
0
        public async Task TestGetBlogPostsAndComments()
        {
            var ps = await blog.GetAllPosts();

            foreach (var p in ps)
            {
                var pc = await blog.GetComments(p);

                foreach (var comment in p.BlogComments)
                {
                    Assert.NotNull(p.id);
                    Assert.NotEqual(p.createdOnUtc, Timestamp.FromDateTime(DateTime.MinValue.ToUniversalTime()));
                    Assert.NotEqual(p.lastReadUtc, Timestamp.FromDateTime(DateTime.MinValue.ToUniversalTime()));
                    log.LogInformation(p.createdOnUtc.ToString());
                    log.LogInformation(p.lastReadUtc.ToString());
                }
                Assert.Equal(pc.Count, p.BlogComments.Count);
            }
        }