Skip to content

Conversation

lipchev
Copy link
Collaborator

@lipchev lipchev commented Apr 11, 2025

fixes the first part of #1509

  • UnitAbbreviationsCache: GetDefaultAbbreviation should throw when no abbreviations are mapped
  • Volume: added the missing abbreviation mappings

… abbreviations are mapped

- Volume: added the missing abbreviation mappings
@lipchev
Copy link
Collaborator Author

lipchev commented Apr 11, 2025

This is missing a test for the unhappy path:

        [Fact]
        public void GetDefaultAbbreviation_ForUnitWithoutAbbreviations_ThrowsInvalidOperationException()
        {
            Assert.Throws<InvalidOperationException>(() => new UnitAbbreviationsCache([HowMuch.Info]).GetDefaultAbbreviation(HowMuchUnit.AShitTon));
        }

But this doesn't work just yet.. I'll add it later, probably after the little refactoring I got planned for the the UnitAbbreviationsCacheTests.

@angularsen angularsen merged commit c02b189 into angularsen:master Apr 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants