Example #1
0
        public void GetUnmaskedValue_ValidStringRepresentationOfMaskedInteger_ReturnsUnderlyingIntegerValue()
        {
            const string inputValue    = "MX12P";
            const int    expectedValue = 123;

            int actualValue = MaskableInt32.GetUnmaskedValue(inputValue);

            Assert.AreEqual(expectedValue, actualValue);
        }
Example #2
0
        public void GetUnmaskedValue_InvalidStringRepresentationOfMaskedInteger_ThrowsException()
        {
            const string inputValue = "invalid";

            MaskableInt32.GetUnmaskedValue(inputValue);
        }