Exemplo n.º 1
0
        public void Test_HighestOrLowestRate_ReturnsACurrencyWithTheValueOne_WhenGivenAListOfOneElementWithEURRateOneAndTrue()
        {
            mockXML.Object.Add(new Mock<Currency>("EUR", 1, "12-12-2012").Object);
            Comparison comparison = new Comparison(mockXML.Object);

            Currency actual = comparison.HighestOrLowestRate("EUR", true, mockXML.Object);

            Assert.AreEqual(1, actual.value);
        }
Exemplo n.º 2
0
        public void Test_HighestOrLowestRate_ReturnsAEmptyCurrency_WhenGivenAnEmptyListAnEmptyStringAndTrue()
        {
            Comparison comparison = new Comparison(mockXML.Object);

            Currency actual = comparison.HighestOrLowestRate("",true,mockXML.Object);

            Assert.IsTrue(actual is Currency);
        }
Exemplo n.º 3
0
        public void Test_HighestOrLowestRate_ReturnsACurrencyWithTheValue0_WhenGivenAListOfThreeElementsAndFalse()
        {
            mockXML.Object.Add(new Mock<Currency>("EUR", 1, "12-12-2012").Object);
            mockXML.Object.Add(new Mock<Currency>("EUR", 0, "12-12-2012").Object);
            mockXML.Object.Add(new Mock<Currency>("EUR", 5, "12-12-2012").Object);
            Comparison comparison = new Comparison(mockXML.Object);

            Currency actual = comparison.HighestOrLowestRate("EUR", false, mockXML.Object);

            Assert.AreEqual(0, actual.value);
        }