public void TryGet_Should_Return_True_If_Item_Exists(ICompoundKeyRepository <User, string, int> repository) { var item = new User { Username = "******", Age = 21 }; repository.Add(item); repository.Exists(item.Username, item.Age).ShouldBeTrue(); }
public void TryGet_Should_Return_False_If_Item_Does_Not_Exists(ICompoundKeyRepository<User, string, int> repository) { repository.Exists(string.Empty, 0).ShouldBeFalse(); }
public void TryGet_Should_Return_True_If_Item_Exists(ICompoundKeyRepository<User, string, int> repository) { var item = new User { Username = "******", Age = 21 }; repository.Add(item); repository.Exists(item.Username, item.Age).ShouldBeTrue(); }
public void TryGet_Should_Return_False_If_Item_Does_Not_Exists(ICompoundKeyRepository <User, string, int> repository) { repository.Exists(string.Empty, 0).ShouldBeFalse(); }
public bool Exists(ISpecification <T> criteria) { return(Repository.Exists(criteria)); }