public void MapBOToModelList() { var mapper = new BOLDatabaseLogMapper(); BODatabaseLog bo = new BODatabaseLog(); bo.SetProperties(1, "A", "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A"); List <ApiDatabaseLogResponseModel> response = mapper.MapBOToModel(new List <BODatabaseLog>() { { bo } }); response.Count.Should().Be(1); }
public void MapModelToBO() { var mapper = new BOLDatabaseLogMapper(); ApiDatabaseLogRequestModel model = new ApiDatabaseLogRequestModel(); model.SetProperties("A", "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A"); BODatabaseLog response = mapper.MapModelToBO(1, model); response.DatabaseUser.Should().Be("A"); [email protected]().Be("A"); [email protected]().Be("A"); response.PostTime.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Schema.Should().Be("A"); response.Tsql.Should().Be("A"); response.XmlEvent.Should().Be("A"); }
public void MapBOToModel() { var mapper = new BOLDatabaseLogMapper(); BODatabaseLog bo = new BODatabaseLog(); bo.SetProperties(1, "A", "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A"); ApiDatabaseLogResponseModel response = mapper.MapBOToModel(bo); response.DatabaseLogID.Should().Be(1); response.DatabaseUser.Should().Be("A"); [email protected]().Be("A"); [email protected]().Be("A"); response.PostTime.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Schema.Should().Be("A"); response.Tsql.Should().Be("A"); response.XmlEvent.Should().Be("A"); }
public void MapEFToBO() { var mapper = new DALDatabaseLogMapper(); DatabaseLog entity = new DatabaseLog(); entity.SetProperties(1, "A", "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A"); BODatabaseLog response = mapper.MapEFToBO(entity); response.DatabaseLogID.Should().Be(1); response.DatabaseUser.Should().Be("A"); [email protected]().Be("A"); [email protected]().Be("A"); response.PostTime.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Schema.Should().Be("A"); response.Tsql.Should().Be("A"); response.XmlEvent.Should().Be("A"); }