• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ShipEngine / shipengine-dotnet / 9670357484 / 1
84%
main: 83%

Build:
Build:
LAST BUILD BRANCH: ENGINE-7190-funding-sources-wallet-errors
DEFAULT BRANCH: main
Ran 25 Jun 2024 10:21PM UTC
Files 31
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Jun 2024 10:18PM UTC coverage: 84.271% (-1.1%) from 85.36%
9670357484.1

Pull #92

github

joshuaflanagan
Demonstrate backward-compatible deprecation of enums

I would like to get rid of using C# enums in the SDK. They unnecessarily constrain the
values that a user can send to the ShipEngine API. The API expects a string, the SDK
should allow the user to specify a string. An enum requires converting values to an integer,
which has no value for our purposes. It also leads to awkwardness when the default is `0`,
which will correspond to an enum value we don't necessarily want. It requires the user
to update their SDK any time there is a new possible value accepted by the API.
We can still provide guidance for valid values via classes that expose static strings.

However, there is likely code in the wild where users are setting properties to an enum value.
This is an experiment to demonstrate using implicit conversion operators, and a custom JsonConverter,
to allow a user to set a "string enum" value using a string or an enum.
Pull Request #92: Demonstrate backward-compatible deprecation of enums

44 of 78 branches covered (56.41%)

Branch coverage included in aggregate %.

690 of 793 relevant lines covered (87.01%)

14.79 hits per line

Source Files on job run- - 9670357484.1
  • Tree
  • List 31
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 9670357484
  • a72058ce on github
  • Prev Job for on string-enum (#9486504073.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc