Skip to content

Commit

Permalink
chore: Added store tests
Browse files Browse the repository at this point in the history
  • Loading branch information
svrooij committed May 2, 2024
1 parent c3c2bea commit ef66327
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WingetIntune.sln
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Svrooij.WinTuner.CmdLets",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4E745B8F-95AD-42CC-A462-EBA6896413E2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Winget.CommunityRepository.Ef", "src\Winget.CommunityRepository.Ef\Winget.CommunityRepository.Ef.csproj", "{516169B3-872B-443B-8736-27E2A08E7091}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Winget.CommunityRepository.Ef", "src\Winget.CommunityRepository.Ef\Winget.CommunityRepository.Ef.csproj", "{516169B3-872B-443B-8736-27E2A08E7091}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Apps", "Apps", "{4D1367F6-2076-481E-A7BD-0BFA6BEFCA3D}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion src/WingetIntune/Internal/MsStore/StoreClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public MicrosoftStoreClient(HttpClient httpClient, ILogger<MicrosoftStoreClient>
}
}

private async Task<MicrosoftStoreSearchResult?> Search(string searchString, CancellationToken cancellationToken)
public async Task<MicrosoftStoreSearchResult?> Search(string searchString, CancellationToken cancellationToken)
{
var url = "https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch";
var body = new MicrosoftStoreSearchRequest
Expand Down
15 changes: 15 additions & 0 deletions src/WingetIntune/Internal/MsStore/store-requests.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# For more info on HTTP files go to https://aka.ms/vs/httpfile

POST https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch HTTP/1.1
Content-Type: application/json

{
"Query": {
"KeyWord": "FireFox",
"MatchType": "Substring"
}
}

###

GET https://displaycatalog.mp.microsoft.com/v7.0/products?bigIds=9NZVDKPMR9RD&market=US&languages=en-us
137 changes: 137 additions & 0 deletions tests/WingetIntune.Tests/MsStore/MicrosoftStoreClientTests.cs

Large diffs are not rendered by default.

0 comments on commit ef66327

Please sign in to comment.