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 ShouldGetServerDistance_WhenServerDtoDistanceIsValid()
 {
     //assert
     Assert.AreEqual(150, _validDto.ServerDistance());
 }
 public void ShouldThrowRetrieveServerDistanceException_WhenServerDtoDistanceIsInvalid()
 {
     //assert
     _failedDto.ServerDistance();
 }