@@ -2923,13 +2923,13 @@ public void contactdata_generator_can_generate_payload_full_vcard4_reverse()
29232923 [ Category ( "PayloadGenerator/WhatsAppMessage" ) ]
29242924 public void whatsapp_generator_can_generate_payload_simple ( )
29252925 {
2926- var number = "01601234567 " ;
2926+ var number = "491601234567 " ;
29272927 var msg = "This is a sample message with Umlauts: Ä,ö, ü and ß." ;
29282928 var generator = new PayloadGenerator . WhatsAppMessage ( number , msg ) ;
29292929
29302930 generator
29312931 . ToString ( )
2932- . ShouldBe ( "whatsapp ://send?phone=01601234567& text=This%20is%20a%20sample%20message%20with%20Umlauts%3A%20%C3%84%2C%C3%B6%2C%20%C3%BC%20and%20%C3%9F." ) ;
2932+ . ShouldBe ( "https ://wa.me/491601234567? text=This%20is%20a%20sample%20message%20with%20Umlauts%3A%20%C3%84%2C%C3%B6%2C%20%C3%BC%20and%20%C3%9F." ) ;
29332933 }
29342934
29352935 [ Fact ]
@@ -2941,9 +2941,34 @@ public void whatsapp_should_add_unused_params()
29412941
29422942 generator
29432943 . ToString ( )
2944- . ShouldBe ( "whatsapp ://send?phone=& text=This%20is%20a%20sample%20message%20with%20Umlauts%3A%20%C3%84%2C%C3%B6%2C%20%C3%BC%20and%20%C3%9F." ) ;
2944+ . ShouldBe ( "https ://wa.me/? text=This%20is%20a%20sample%20message%20with%20Umlauts%3A%20%C3%84%2C%C3%B6%2C%20%C3%BC%20and%20%C3%9F." ) ;
29452945 }
29462946
2947+ [ Fact ]
2948+ [ Category ( "PayloadGenerator/WhatsAppMessage" ) ]
2949+ public void whatsapp_should_cleanup_phonenumber_1 ( )
2950+ {
2951+ var number = "+49(160)1234567" ;
2952+ var msg = "This is a sample message with Umlauts: Ä,ö, ü and ß." ;
2953+ var generator = new PayloadGenerator . WhatsAppMessage ( number , msg ) ;
2954+
2955+ generator
2956+ . ToString ( )
2957+ . ShouldBe ( "https://wa.me/491601234567?text=This%20is%20a%20sample%20message%20with%20Umlauts%3A%20%C3%84%2C%C3%B6%2C%20%C3%BC%20and%20%C3%9F." ) ;
2958+ }
2959+
2960+ [ Fact ]
2961+ [ Category ( "PayloadGenerator/WhatsAppMessage" ) ]
2962+ public void whatsapp_should_cleanup_phonenumber_2 ( )
2963+ {
2964+ var number = "0049-160-1234 567" ;
2965+ var msg = "This is a sample message with Umlauts: Ä,ö, ü and ß." ;
2966+ var generator = new PayloadGenerator . WhatsAppMessage ( number , msg ) ;
2967+
2968+ generator
2969+ . ToString ( )
2970+ . ShouldBe ( "https://wa.me/491601234567?text=This%20is%20a%20sample%20message%20with%20Umlauts%3A%20%C3%84%2C%C3%B6%2C%20%C3%BC%20and%20%C3%9F." ) ;
2971+ }
29472972
29482973 [ Fact ]
29492974 [ Category ( "PayloadGenerator/Monero" ) ]
@@ -2957,7 +2982,6 @@ public void monero_generator_can_generate_payload_simple()
29572982 . ShouldBe ( "monero://46BeWrHpwXmHDpDEUmZBWZfoQpdc6HaERCNmx1pEYL2rAcuwufPN9rXHHtyUA4QVy66qeFQkn6sfK8aHYjA3jk3o1Bv16em" ) ;
29582983 }
29592984
2960-
29612985 [ Fact ]
29622986 [ Category ( "PayloadGenerator/Monero" ) ]
29632987 public void monero_generator_can_generate_payload_first_param ( )
0 commit comments