public IQueryable<Visit> FindAll() { User user1 = new User {Name = "Kalle"}; User user2 = new User {Name = "Pelle"}; User user3 = new User {Name = "Lasse"}; return new[] { new Visit {User = user1, User1 = user2}, new Visit {User = user1, User1 = user3}, new Visit {User = user3, User1 = user2} } .AsQueryable(); }
public void Convert_UserWithImage_ShouldStillHaveUserForPerformanceReasons() { var bf = new BinaryFormatter(); var ms = new MemoryStream(); const string original = "喂 Hello 谢谢 Thank You"; bf.Serialize(ms, original); ms.Seek(0, 0); byte[] bytes = ms.ToArray(); var userToConvert = new User {Name = "Kalle", Image = bytes }; Assert.That(userToConvert.Image, !Is.Null); var actualUserView = _userPresenter.Presentate(userToConvert); Assert.That(actualUserView.User.Image, Is.EqualTo(userToConvert.Image)); }
public void Delete(User entity) { throw new NotImplementedException(); }