public void MapBOToModelList() { var mapper = new BOLPetMapper(); BOPet bo = new BOPet(); bo.SetProperties(1, 1, 1, "A", 1); List <ApiPetResponseModel> response = mapper.MapBOToModel(new List <BOPet>() { { bo } }); response.Count.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLPetMapper(); BOPet bo = new BOPet(); bo.SetProperties(1, 1, 1, "A", 1); ApiPetResponseModel response = mapper.MapBOToModel(bo); response.BreedId.Should().Be(1); response.ClientId.Should().Be(1); response.Id.Should().Be(1); response.Name.Should().Be("A"); response.Weight.Should().Be(1); }
public void MapBOToEF() { var mapper = new DALPetMapper(); var bo = new BOPet(); bo.SetProperties(1, 1, 1, "A", 1); Pet response = mapper.MapBOToEF(bo); response.BreedId.Should().Be(1); response.ClientId.Should().Be(1); response.Id.Should().Be(1); response.Name.Should().Be("A"); response.Weight.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLPetMapper(); BOPet bo = new BOPet(); bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, "A", 1, 1m, 1); ApiPetResponseModel response = mapper.MapBOToModel(bo); response.AcquiredDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.BreedId.Should().Be(1); response.Description.Should().Be("A"); response.Id.Should().Be(1); response.PenId.Should().Be(1); response.Price.Should().Be(1m); response.SpeciesId.Should().Be(1); }