feat(ads/seo/release): v1.2.0 with live Google Ads, isolated ad profile, ads.txt, and SEO/AEO/GEO optimization
This commit is contained in:
parent
a88aafa1e5
commit
0e568f1f0a
975 changed files with 130593 additions and 16783 deletions
44
tests/Paca.Tests/Mobile/MobileShareTextExtractorGateTests.cs
Normal file
44
tests/Paca.Tests/Mobile/MobileShareTextExtractorGateTests.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using Paca.Mobile.Core;
|
||||
using Xunit;
|
||||
|
||||
namespace Paca.Tests.Mobile;
|
||||
|
||||
public class MobileShareTextExtractorGateTests
|
||||
{
|
||||
[Fact]
|
||||
public void Gate253_MobileShareTextExtractor_ExtractsCleanUrl_FromMessyShareText()
|
||||
{
|
||||
var shared = "Watch \"Awesome Video\" on YouTube: https://youtu.be/dQw4w9WgXcQ?si=abcdef12345";
|
||||
var extracted = MobileShareTextExtractor.ExtractMediaUrl(shared);
|
||||
|
||||
Assert.Equal("https://youtu.be/dQw4w9WgXcQ", extracted);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate254_MobileShareTextExtractor_HandlesMultipleUrls_PicksFirstValidMediaUrl()
|
||||
{
|
||||
var shared = "Read info at https://google.com and watch https://tiktok.com/@user/video/9876543210";
|
||||
var extracted = MobileShareTextExtractor.ExtractMediaUrl(shared);
|
||||
|
||||
Assert.Equal("https://tiktok.com/@user/video/9876543210", extracted);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate255_MobileShareTextExtractor_ReturnsNull_WhenNoValidUrlPresent()
|
||||
{
|
||||
var shared = "Just plain message from a friend without any hyperlink";
|
||||
var extracted = MobileShareTextExtractor.ExtractMediaUrl(shared);
|
||||
|
||||
Assert.Null(extracted);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate256_MobileShareTextExtractor_StripsTrackingQueryParameters_PreservesVideoId()
|
||||
{
|
||||
var url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&utm_source=twitter&si=123&fbclid=xyz";
|
||||
var extracted = MobileShareTextExtractor.ExtractMediaUrl(url);
|
||||
|
||||
Assert.Equal("https://www.youtube.com/watch?v=dQw4w9WgXcQ", extracted);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue