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