public void TryFind_Should_Return_True_Which_Satisfies_Specification(IRepository<Contact, string> repository)
        {
            for (var i = 1; i <= 3; i++)
            {
                var contact = new Contact { Name = "Test User " + i };
                repository.Add(contact);
            }

            repository.Exists(new Specification<Contact>(p => p.Name == "Test User 1")).ShouldBeTrue();
        }
 public void TryFind_Should_Return_False_When_Specification_Does_Not_Match(IRepository<Contact, string> repository)
 {
     repository.Exists(new Specification<Contact>(p => p.Name == "DOES NOT EXIST")).ShouldBeFalse();
 }
        public void TryGet_Should_Return_True_If_Item_Exists(IRepository<Contact, string> repository)
        {
            var contact = new Contact { Name = "Test User", ContactTypeId = 1 };
            repository.Add(contact);

            repository.Exists(contact.ContactId).ShouldBeTrue();
        }
 public void TryFind_Should_Return_False_When_Predicate_Does_Not_Match(IRepository<Contact, string> repository)
 {
     repository.Exists(p => p.Name == "DOES NOT EXIST").ShouldBeFalse();
 }
 public void TryGet_Should_Return_False_If_Item_Does_Not_Exists(IRepository<Contact, string> repository)
 {
     repository.Exists(string.Empty).ShouldBeFalse();
 }