public async Task GetByName_NullArgument_ShouldReturnNull() { // arrange var context = await InitializeContext(); var repository = new Application.Repository.Tag.TagRepository(context); //act var result = await repository.GetByNameLike(null); //assert Assert.Null(result); //clean DisposeContext(context); }
public async Task GetByName_ValidArgument_BadLetterCase_ShouldReturnPropertyObject() { // arrange var context = await InitializeContext(); var repository = new Application.Repository.Tag.TagRepository(context); string name = "waRSaw"; int expectedId = 1; //act var result = await repository.GetByNameLike(name); //assert Assert.NotNull(result); Assert.AreEqual(expectedId, result.Id); //clean DisposeContext(context); }
public async Task GetByName_MatchedArgument() { // arrange var context = await InitializeContext(); var repository = new Application.Repository.Tag.TagRepository(context); string name = "Warsaw"; int expectedId = 1; //act var result = await repository.GetByNameLike(name); //assert Assert.NotNull(result); Assert.AreEqual(expectedId, result.Id); //clean DisposeContext(context); }