public void Details()
        {
            // Arrange
            var userId = new Guid("00000000-0000-0000-0000-000000000001");
            var user = new User
                           {
                               Id = userId
                           };

            DataRepository.Stub(d => d.SelectEntity(u => u.Id == userId))
                .Return(user)
                .IgnoreArguments();

            // Act
            var viewResult = Sut.Details(userId) as ViewResult;
            var viewModel = viewResult.Model as UserViewModel;

            // Assert
            Assert.That(viewModel, Is.Not.Null);
            Assert.That(viewModel.Id, Is.EqualTo(userId));
        }
 public static UserViewModel Create(User user)
 {
     AutoMapper.Mapper.Configuration.CreateMap<User, UserViewModel>();
     return AutoMapper.Mapper.Map<User, UserViewModel>(user);
 }