| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using System.Linq;
|
|---|
| 4 | using System.Linq.Expressions;
|
|---|
| 5 | using System.Text;
|
|---|
| 6 | using Wierszowki.Core;
|
|---|
| 7 | using Wierszowki.Core.Interfaces;
|
|---|
| 8 | using Wierszowki.Core.Linq;
|
|---|
| 9 |
|
|---|
| 10 | namespace Wierszowki.Tests
|
|---|
| 11 | {
|
|---|
| 12 | public class TestUserRepository : IRepository<User>
|
|---|
| 13 | {
|
|---|
| 14 |
|
|---|
| 15 | //List<User> users = new List<User>();
|
|---|
| 16 | //public TestUserRepository()
|
|---|
| 17 | //{
|
|---|
| 18 | // var user = new User
|
|---|
| 19 | // {
|
|---|
| 20 | // Id = 1,
|
|---|
| 21 | // FirstName = "Test",
|
|---|
| 22 | // LastName = "Tester",
|
|---|
| 23 | // Login = "user",
|
|---|
| 24 | // Password = "password"
|
|---|
| 25 | // };
|
|---|
| 26 | // users.Add(user);
|
|---|
| 27 | //}
|
|---|
| 28 |
|
|---|
| 29 | //public User FindByLoginAndPassword(string login, string password)
|
|---|
| 30 | //{
|
|---|
| 31 | // return users.Find(u => u.Login == login && u.Password == password);
|
|---|
| 32 | //}
|
|---|
| 33 |
|
|---|
| 34 | public int Count()
|
|---|
| 35 | {
|
|---|
| 36 | throw new NotImplementedException();
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | public int Count(Expression<Func<User, bool>> expression)
|
|---|
| 40 | {
|
|---|
| 41 | throw new NotImplementedException();
|
|---|
| 42 | }
|
|---|
| 43 |
|
|---|
| 44 | public void Insert(User entity)
|
|---|
| 45 | {
|
|---|
| 46 | throw new NotImplementedException();
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 | public void Delete(User entity)
|
|---|
| 50 | {
|
|---|
| 51 | throw new NotImplementedException();
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| 54 | public void Update(User entity)
|
|---|
| 55 | {
|
|---|
| 56 | throw new NotImplementedException();
|
|---|
| 57 | }
|
|---|
| 58 |
|
|---|
| 59 | public User FindOne(int id)
|
|---|
| 60 | {
|
|---|
| 61 | throw new NotImplementedException();
|
|---|
| 62 | }
|
|---|
| 63 |
|
|---|
| 64 | public User FindOne(Expression<Func<User, bool>> expression)
|
|---|
| 65 | {
|
|---|
| 66 | throw new NotImplementedException();
|
|---|
| 67 | }
|
|---|
| 68 |
|
|---|
| 69 | public bool TryFindOne(Expression<Func<User, bool>> expression, out User entity)
|
|---|
| 70 | {
|
|---|
| 71 | var user = new User { Login = "marek", Password = "marek" };
|
|---|
| 72 | entity = user;
|
|---|
| 73 | return true;
|
|---|
| 74 | }
|
|---|
| 75 |
|
|---|
| 76 | public bool Exists(Expression<Func<User, bool>> expression)
|
|---|
| 77 | {
|
|---|
| 78 | throw new NotImplementedException();
|
|---|
| 79 | }
|
|---|
| 80 |
|
|---|
| 81 | public IList<User> FindAll()
|
|---|
| 82 | {
|
|---|
| 83 | throw new NotImplementedException();
|
|---|
| 84 | }
|
|---|
| 85 |
|
|---|
| 86 | public IList<User> FindAll(Expression<Func<User, bool>> expression)
|
|---|
| 87 | {
|
|---|
| 88 | throw new NotImplementedException();
|
|---|
| 89 | }
|
|---|
| 90 |
|
|---|
| 91 | public IQueryable<User> Find()
|
|---|
| 92 | {
|
|---|
| 93 | throw new NotImplementedException();
|
|---|
| 94 | }
|
|---|
| 95 |
|
|---|
| 96 | public IQueryable<User> Find(int id)
|
|---|
| 97 | {
|
|---|
| 98 | throw new NotImplementedException();
|
|---|
| 99 | }
|
|---|
| 100 |
|
|---|
| 101 | public IQueryable<User> Find(Expression<Func<User, bool>> expression)
|
|---|
| 102 | {
|
|---|
| 103 | throw new NotImplementedException();
|
|---|
| 104 | }
|
|---|
| 105 | }
|
|---|
| 106 | } |
|---|