예제 #1
0
        public void MapEFToBOList()
        {
            var   mapper = new DALUsersMapper();
            Users entity = new Users();

            entity.SetProperties("A", 1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1, "A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1, 1, 1, "A");

            List <BOUsers> response = mapper.MapEFToBO(new List <Users>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
예제 #2
0
        public void MapEFToBO()
        {
            var   mapper = new DALUsersMapper();
            Users entity = new Users();

            entity.SetProperties("A", 1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1, "A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1, 1, 1, "A");

            BOUsers response = mapper.MapEFToBO(entity);

            response.AboutMe.Should().Be("A");
            response.AccountId.Should().Be(1);
            response.Age.Should().Be(1);
            response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.DisplayName.Should().Be("A");
            response.DownVotes.Should().Be(1);
            response.EmailHash.Should().Be("A");
            response.Id.Should().Be(1);
            response.LastAccessDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Location.Should().Be("A");
            response.Reputation.Should().Be(1);
            response.UpVotes.Should().Be(1);
            response.Views.Should().Be(1);
            response.WebsiteUrl.Should().Be("A");
        }