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

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

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

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