Exemplo n.º 1
0
        public void MapBOToModelList()
        {
            var        mapper = new BOLPasswordMapper();
            BOPassword bo     = new BOPassword();

            bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            List <ApiPasswordResponseModel> response = mapper.MapBOToModel(new List <BOPassword>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Exemplo n.º 2
0
        public void MapModelToBO()
        {
            var mapper = new BOLPasswordMapper();
            ApiPasswordRequestModel model = new ApiPasswordRequestModel();

            model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            BOPassword response = mapper.MapModelToBO(1, model);

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.PasswordHash.Should().Be("A");
            response.PasswordSalt.Should().Be("A");
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }
Exemplo n.º 3
0
        public void MapBOToModel()
        {
            var        mapper = new BOLPasswordMapper();
            BOPassword bo     = new BOPassword();

            bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            ApiPasswordResponseModel response = mapper.MapBOToModel(bo);

            response.BusinessEntityID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.PasswordHash.Should().Be("A");
            response.PasswordSalt.Should().Be("A");
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }