@@ -2923,13 +2923,13 @@ public void contactdata_generator_can_generate_payload_full_vcard4_reverse()
2923
2923
[ Category ( "PayloadGenerator/WhatsAppMessage" ) ]
2924
2924
public void whatsapp_generator_can_generate_payload_simple ( )
2925
2925
{
2926
- var number = "01601234567 " ;
2926
+ var number = "491601234567 " ;
2927
2927
var msg = "This is a sample message with Umlauts: Ä,ö, ü and ß." ;
2928
2928
var generator = new PayloadGenerator . WhatsAppMessage ( number , msg ) ;
2929
2929
2930
2930
generator
2931
2931
. 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." ) ;
2933
2933
}
2934
2934
2935
2935
[ Fact ]
@@ -2941,9 +2941,34 @@ public void whatsapp_should_add_unused_params()
2941
2941
2942
2942
generator
2943
2943
. 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." ) ;
2945
2945
}
2946
2946
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
+ }
2947
2972
2948
2973
[ Fact ]
2949
2974
[ Category ( "PayloadGenerator/Monero" ) ]
@@ -2957,7 +2982,6 @@ public void monero_generator_can_generate_payload_simple()
2957
2982
. ShouldBe ( "monero://46BeWrHpwXmHDpDEUmZBWZfoQpdc6HaERCNmx1pEYL2rAcuwufPN9rXHHtyUA4QVy66qeFQkn6sfK8aHYjA3jk3o1Bv16em" ) ;
2958
2983
}
2959
2984
2960
-
2961
2985
[ Fact ]
2962
2986
[ Category ( "PayloadGenerator/Monero" ) ]
2963
2987
public void monero_generator_can_generate_payload_first_param ( )
0 commit comments