Ejemplo n.º 1
0
        public void have_3_elements_when_third_line_is_read()
        {
            Tuple <string, string, decimal> exchangeRateLineElements = ConsoleParser.ReadExchangeRatesLine("AUD;CHF;0.9661");

            exchangeRateLineElements.ShouldSatisfyAllConditions
            (
                () => exchangeRateLineElements.Item1.ShouldBe("AUD"),
                () => exchangeRateLineElements.Item2.ShouldBe("CHF"),
                () => exchangeRateLineElements.Item3.ShouldBe(0.9661m)
            );
        }
Ejemplo n.º 2
0
        public void return_null_when_third_line_is_read_does_not_contain_3_elements()
        {
            Tuple <string, string, decimal> exchangeRateLineElements = ConsoleParser.ReadExchangeRatesLine("AUD;CHF");

            exchangeRateLineElements.ShouldBe(null);
        }
Ejemplo n.º 3
0
        public void return_null_when_third_line_is_read_is_empty()
        {
            Tuple <string, string, decimal> exchangeRateLineElements = ConsoleParser.ReadExchangeRatesLine("");

            exchangeRateLineElements.ShouldBe(null);
        }
Ejemplo n.º 4
0
        public void return_null_when_third_line_is_read_and_amount_is_lower_than_0()
        {
            Tuple <string, string, decimal> exchangeRateLineElements = ConsoleParser.ReadExchangeRatesLine("AUD;CHF;-1.3");

            exchangeRateLineElements.ShouldBe(null);
        }