public async void UniversalRepository_Edit_model_should_return_valid_model() { using (Context = new TestDbContext().Context) { var rep = new UniversalRepository <Skill>(Context); var model = await rep.EditAsync(new Skill() { Id = 5 }); Assert.Equal(5, model.Id); } }
public async void UniversalRepository_Edit_7_should_return_ArgumentNullExceptionn() { using (Context = new TestDbContext().Context) { var rep = new UniversalRepository <Skill>(Context); var ex = await Assert.ThrowsAsync <ArgumentNullException>(async() => await rep.EditAsync(new Skill() { Id = 7 })); Assert.Equal(typeof(ArgumentNullException), ex.GetType()); } }