Exemplo n.º 1
0
        public void CheckCodesWhenFormatDataIsCorrect()
        {
            // Arrange
            var expected             = "THB,USD,AUD";
            var templateDataCurrency = @"[{""currency"": ""bat (Tajlandia)"",""code"": ""THB"",""mid"": 0.1267},
                                        {""currency"": ""dolar amerykañski"",""code"": ""USD"",""mid"": 3.8408},
                                        {""currency"": ""dolar australijski"",""code"": ""AUD"",""mid"": 2.6355}]";
            // Act
            var actual = _exchangeHelper.GetCodes(JToken.Parse(templateDataCurrency));

            // Assert
            Assert.That(actual, Is.EqualTo(expected));
        }