示例#1
0
 public async Task CreateMessageAsync_should_throw_ArgumentNullException()
 {
     using (var context = new ChatDbContext(new DbContextOptionsBuilder().Options))
     {
         var store = new ChatStore <string, UserTest, ChatDbContext, Conversation, Attendee, Message, NotificationConnection>(context);
         await Assert.ThrowsAsync <ArgumentNullException>(() => store.CreateMessageAsync(null));
     }
 }
示例#2
0
        public async Task CreateMessageAsync_should_throw_ArgumentNullException()
        {
            ServiceCollection services = GetServicesCollection <ChatDbContext>();

            using (var context = new ChatDbContext(services.BuildServiceProvider()))
            {
                var store = new ChatStore <string, UserTest, ChatDbContext, Conversation, Attendee, Message, NotificationConnection>(context);
                await Assert.ThrowsAsync <ArgumentNullException>(() => store.CreateMessageAsync(null));
            }
        }