Questions tagged [fake-repositories]
5 questions
49
votes
5 answers
How to Generate Random String using Laravel Faker?
is there any way or method to generate fake string using laravel faker ?
like in laravel we generate string upto 20 chars..
str_random(20);

Vishal
- 611
- 1
- 8
- 8
9
votes
3 answers
What's the point of testing fake repositories?
I've been trying to push my mentallity when developing at home to be geared more towards TDD and a bit DDD.
One thing I don't understand though is why you would create a fake repository to test against? I haven't really looked into it much but…

John_
- 2,931
- 3
- 32
- 49
2
votes
3 answers
LINQ to SQL: Fake Repository with Many-to-Many Relationships?
I have two tables, Clients and Administrators, which are linked in a many-to-many relationship by the table ClientAdministrators.
In the real application this works fine and I can get a list of Administrators for my Client. My problem comes in…

Nick
- 4,115
- 10
- 45
- 57
1
vote
1 answer
Best practice to use ffaker gem to generate pseudo data in seed.rb file?
After running rake db:seed, I get the following error: NameError: uninitialized constant Faker
gem file
gem 'ffaker'
seeds.rb file
10.times do
Employee.create(
email: Faker::Internet.email,
password: Faker::Internen.password,
…

Anees
- 33
- 1
- 5
0
votes
2 answers
Initialize FakeRepository<> instead of Repository<> using StructureMap
I have the following repository interface
public interface IRepository {
TEntity FindById(int id);
TEntity FindById(long id);
etc
}
I then have the following Repository class that inherits from the interface above
public…

Gaz
- 1,249
- 3
- 19
- 37