Example #1
0
        private void CheckTranslation(VmPhone source, Phone target)
        {
            target.PrefixNumberId.Should().Be(source.DialCode.Id);
            target.Number.Should().Be(source.Number);
            target.ChargeDescription.Should().Be(source.ChargeDescription);
            target.AdditionalInformation.Should().Be(source.AdditionalInformation);

            target.ChargeTypeId.Should().Be(source.ChargeType == Guid.Empty ? DefaultServiceChargeTypeId : source.ChargeType);
            target.TypeId.Should().Be(source.TypeId == Guid.Empty ? DefaultTypeId : source.TypeId);
            target.LocalizationId.Should().Be(source.LanguageId.IsAssigned() ? source.LanguageId.Value : DefaultLangugeId);
        }
Example #2
0
 private void CheckTranslation(Phone source, VmPhone target)
 {
     target.Id.Should().Be(source.Id);
     if (source.PrefixNumberId.IsAssigned())
     {
         target.DialCode.Should().NotBeNull();
         target.DialCode.Id.Should().Be(source.PrefixNumberId);
     }
     else
     {
         target.DialCode.Should().BeNull();
     }
     target.Number.Should().Be(source.Number);
     target.LanguageId.Should().Be(source.LocalizationId);
     target.TypeId.Should().Be(source.TypeId);
     target.ChargeType.Should().Be(source.ChargeTypeId);
     target.AdditionalInformation.Should().Be(source.AdditionalInformation);
     target.ChargeDescription.Should().Be(source.ChargeDescription);
 }