Refactor des noms de variables pour les TU de InquityMapper et LessonMapper

pull/45/head
Maxime SAPOUNTZIS 1 year ago
parent 0b4b379d2f
commit fe4d22e5f9

@ -25,9 +25,9 @@ namespace TestEF.Mapper
Assert.NotNull(inquiryEntity);
Assert.IsType<InquiryEntity>(inquiryEntity);
Assert.Equal(1, inquiry.Id);
Assert.Equal(_title, inquiry.Title);
Assert.Equal(_description, inquiry.Description);
Assert.Equal(1, inquiryEntity.Id);
Assert.Equal(_title, inquiryEntity.Title);
Assert.Equal(_description, inquiryEntity.Description);
}
[Fact]
@ -35,13 +35,13 @@ namespace TestEF.Mapper
{
InquiryEntity inquiry = new InquiryEntity(_id,_title, _description, _isUser);
var inquiryEntity = inquiry.FromEntityToDTO();
var inquiryDto = inquiry.FromEntityToDTO();
Assert.NotNull(inquiryEntity);
Assert.IsType<InquiryDTO>(inquiryEntity);
Assert.Equal(1, inquiry.Id);
Assert.Equal(_title, inquiry.Title);
Assert.Equal(_description, inquiry.Description);
Assert.NotNull(inquiryDto);
Assert.IsType<InquiryDTO>(inquiryDto);
Assert.Equal(1, inquiryDto.Id);
Assert.Equal(_title, inquiryDto.Title);
Assert.Equal(_description, inquiryDto.Description);
}
@ -53,9 +53,9 @@ namespace TestEF.Mapper
Assert.NotNull(inquiryEntity);
Assert.IsType<InquiryEntity>(inquiryEntity);
Assert.Equal(1, inquiry.Id);
Assert.Equal(_title, inquiry.Title);
Assert.Equal(_description, inquiry.Description);
Assert.Equal(1, inquiryEntity.Id);
Assert.Equal(_title, inquiryEntity.Title);
Assert.Equal(_description, inquiryEntity.Description);
}
[Fact]
@ -63,13 +63,13 @@ namespace TestEF.Mapper
{
InquiryEntity inquiry = new InquiryEntity(_id,_title, _description, _isUser);
var inquiryEntity = inquiry.FromEntityToModel();
var inquiryMod = inquiry.FromEntityToModel();
Assert.NotNull(inquiryEntity);
Assert.IsType<Inquiry>(inquiryEntity);
Assert.Equal(1, inquiry.Id);
Assert.Equal(_title, inquiry.Title);
Assert.Equal(_description, inquiry.Description);
Assert.NotNull(inquiryMod);
Assert.IsType<Inquiry>(inquiryMod);
Assert.Equal(1, inquiryMod.Id);
Assert.Equal(_title, inquiryMod.Title);
Assert.Equal(_description, inquiryMod.Description);
}
@ -78,13 +78,13 @@ namespace TestEF.Mapper
public void TestDtoToModel()
{
InquiryDTO inquiry = new InquiryDTO(_id, _title, _description, _isUser);
var inquiryEntity = inquiry.FromDTOToEntity();
var inquiryMod = inquiry.FromDTOToEntity();
Assert.NotNull(inquiryEntity);
Assert.IsType<InquiryEntity>(inquiryEntity);
Assert.Equal(1, inquiry.Id);
Assert.Equal(_title, inquiry.Title);
Assert.Equal(_description, inquiry.Description);
Assert.NotNull(inquiryMod);
Assert.IsType<InquiryEntity>(inquiryMod);
Assert.Equal(1, inquiryMod.Id);
Assert.Equal(_title, inquiryMod.Title);
Assert.Equal(_description, inquiryMod.Description);
}
[Fact]
@ -92,13 +92,13 @@ namespace TestEF.Mapper
{
Inquiry inquiry = new Inquiry(_id,_title, _description, _isUser);
var inquiryEntity = inquiry.FromModelToDTO();
var inquiryDto = inquiry.FromModelToDTO();
Assert.NotNull(inquiryEntity);
Assert.IsType<InquiryDTO>(inquiryEntity);
Assert.Equal(1, inquiry.Id);
Assert.Equal(_title, inquiry.Title);
Assert.Equal(_description, inquiry.Description);
Assert.NotNull(inquiryDto);
Assert.IsType<InquiryDTO>(inquiryDto);
Assert.Equal(1, inquiryDto.Id);
Assert.Equal(_title, inquiryDto.Title);
Assert.Equal(_description, inquiryDto.Description);
}
}

@ -25,9 +25,9 @@ namespace TestEF.Mapper
Assert.NotNull(lessonEntity);
Assert.IsType<LessonEntity>(lessonEntity);
Assert.Equal(1, lesson.Id);
Assert.Equal(_title, lesson.Title);
Assert.Equal(_lastPublisher, lesson.LastPublisher);
Assert.Equal(1, lessonEntity.Id);
Assert.Equal(_title, lessonEntity.Title);
Assert.Equal(_lastPublisher, lessonEntity.LastPublisher);
}
@ -35,13 +35,13 @@ namespace TestEF.Mapper
public void TestDtoToModel()
{
LessonDTO lesson = new LessonDTO(_id, _title, _lastPublisher, date);
var lessonEntity = lesson.FromDTOToModel();
var lessonMod = lesson.FromDTOToModel();
Assert.NotNull(lessonEntity);
Assert.IsType<Lesson>(lessonEntity);
Assert.Equal(1, lesson.Id);
Assert.Equal(_title, lesson.Title);
Assert.Equal(_lastPublisher, lesson.LastPublisher);
Assert.NotNull(lessonMod);
Assert.IsType<Lesson>(lessonMod);
Assert.Equal(1, lessonMod.Id);
Assert.Equal(_title, lessonMod.Title);
Assert.Equal(_lastPublisher, lessonMod.LastPublisher);
}
[Fact]
@ -49,13 +49,13 @@ namespace TestEF.Mapper
{
LessonEntity lesson = new LessonEntity(_id,_title, _lastPublisher, date);
var lessonEntity = lesson.FromEntityToDTO();
var lessonDto = lesson.FromEntityToDTO();
Assert.NotNull(lessonEntity);
Assert.IsType<LessonDTO>(lessonEntity);
Assert.Equal(1, lesson.Id);
Assert.Equal(_title, lesson.Title);
Assert.Equal(_lastPublisher, lesson.LastPublisher);
Assert.NotNull(lessonDto);
Assert.IsType<LessonDTO>(lessonDto);
Assert.Equal(1, lessonDto.Id);
Assert.Equal(_title, lessonDto.Title);
Assert.Equal(_lastPublisher, lessonDto.LastPublisher);
}
[Fact]
@ -63,13 +63,13 @@ namespace TestEF.Mapper
{
LessonEntity lesson = new LessonEntity(_id, _title, _lastPublisher, date);
var lessonEntity = lesson.FromEntityToModel();
var lessonMod = lesson.FromEntityToModel();
Assert.NotNull(lessonEntity);
Assert.IsType<Lesson>(lessonEntity);
Assert.Equal(1, lesson.Id);
Assert.Equal(_title, lesson.Title);
Assert.Equal(_lastPublisher, lesson.LastPublisher);
Assert.NotNull(lessonMod);
Assert.IsType<Lesson>(lessonMod);
Assert.Equal(1, lessonMod.Id);
Assert.Equal(_title, lessonMod.Title);
Assert.Equal(_lastPublisher, lessonMod.LastPublisher);
}
@ -79,13 +79,13 @@ namespace TestEF.Mapper
{
Lesson lesson = new Lesson(_id, _title, _lastPublisher, date);
var lessonEntity = lesson.FromModelToDTO();
var lessonDto = lesson.FromModelToDTO();
Assert.NotNull(lessonEntity);
Assert.IsType<LessonDTO>(lessonEntity);
Assert.Equal(1, lesson.Id);
Assert.Equal(_title, lesson.Title);
Assert.Equal(_lastPublisher, lesson.LastPublisher);
Assert.NotNull(lessonDto);
Assert.IsType<LessonDTO>(lessonDto);
Assert.Equal(1, lessonDto.Id);
Assert.Equal(_title, lessonDto.Title);
Assert.Equal(_lastPublisher, lessonDto.LastPublisher);
}
[Fact]
@ -97,9 +97,9 @@ namespace TestEF.Mapper
Assert.NotNull(lessonEntity);
Assert.IsType<LessonEntity>(lessonEntity);
Assert.Equal(1, lesson.Id);
Assert.Equal(_title, lesson.Title);
Assert.Equal(_lastPublisher, lesson.LastPublisher);
Assert.Equal(1, lessonEntity.Id);
Assert.Equal(_title, lessonEntity.Title);
Assert.Equal(_lastPublisher, lessonEntity.LastPublisher);
}
}
}

Loading…
Cancel
Save