Beispiel #1
0
 //todo: Use Automapper
 public static Server MapToServer(this ServerDto dto)
 {
     return(new Server
     {
         Number = dto.ServerNumber(),
         Country = dto.ServerCountryName(),
         Distance = dto.ServerDistance()
     });
 }
 public void ShouldGetServerCountryName_WhenServerDtoNameIsValid()
 {
     //assert
     Assert.AreEqual("Ukraine", _validDto.ServerCountryName());
 }
 public void ShouldThrowRetrieveServerCountryNameException_WhenServerDtoNameIsInvalid()
 {
     //assert
     _failedDto.ServerCountryName();
 }