feat: add KsefClientRateLimitGroup enum - #237
Open
sirmazur wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opis
Dodaje publiczny enum
KsefClientRateLimitGroupreprezentujący grupy limitów dostępne wEffectiveApiRateLimits.Dodano również metody rozszerzające:
GetRateLimitValues(group)— pobiera limity wskazanej grupy,GetAllRateLimitValues()— zwraca limity wszystkich grup.Dzięki temu użytkownicy biblioteki nie muszą samodzielnie definiować i utrzymywać listy grup limitów.
Testy
Dodano testy jednostkowe sprawdzające:
EffectiveApiRateLimits,Jeden z testów wykorzystuje refleksję do sprawdzania spójności między właściwościami EffectiveApiRateLimits, wartościami enuma i ich mapowaniem. Dzięki temu wykryje niepełne dodanie nowej grupy limitów, a po jej poprawnym zaimplementowaniu nie wymaga ręcznego rozszerzania przypadków testowych.
Testy przechodzą na
net48,net8.0,net9.0inet10.0. ProjektKSeF.Client.Tests.Corekompiluje się bez błędów.Zmiana jest addytywna i nie modyfikuje istniejącego publicznego API.
Closes #230