Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }