예제 #1
0
        public void Retrieve_correct_nullable_value(string value, ulong?expectation)
        {
            var retriever = new ULongValueRetriever();
            var result    = (ulong?)retriever.Retrieve(new KeyValuePair <string, string>(IrrelevantKey, value), IrrelevantType, typeof(ulong?));

            result.Should().Be(expectation);
        }
예제 #2
0
        public void Retrieve_a_ulong_when_passed_a_ulong_value_if_culture_is_fr_Fr()
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR", false);

            var retriever = new ULongValueRetriever();
            var result    = (ulong?)retriever.Retrieve(new KeyValuePair <string, string>(IrrelevantKey, "1234567890123456789,0"), IrrelevantType, typeof(ulong?));

            result.Should().Be(1234567890123456789UL);
        }