Ejemplo n.º 1
0
        public void Retrieve_correct_nullable_value(string value, ushort?expectation)
        {
            var retriever = new UShortValueRetriever();
            var result    = (ushort?)retriever.Retrieve(new KeyValuePair <string, string>(IrrelevantKey, value), IrrelevantType, typeof(ushort?));

            result.Should().Be(expectation);
        }
Ejemplo n.º 2
0
        public void Retrieve_a_ushort_when_passed_a_ushort_value_if_culture_is_fr_Fr()
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR", false);

            var retriever = new UShortValueRetriever();
            var result    = (ushort?)retriever.Retrieve(new KeyValuePair <string, string>(IrrelevantKey, "305,0"), IrrelevantType, typeof(ushort?));

            result.Should().Be(305);
        }