Example #1
0
        public void FiveDollars_FiveFrancs_AreNotEqual()
        {
            var fiveDollars = MoneyProvider.Dollar(5);
            var fiveFrancs  = MoneyProvider.Franc(5);

            Assert.AreNotEqual(fiveDollars, fiveFrancs);
        }
Example #2
0
        public void NineFrancs_TenFrancs_AreNotEqual()
        {
            var nineFrancs = MoneyProvider.Franc(9);
            var tenFrancs  = MoneyProvider.Franc(10);

            Assert.AreNotEqual(nineFrancs, tenFrancs);
        }
Example #3
0
        public void TwoFrancs_TwoFrancs_AreEqual()
        {
            var twoFrancs1 = MoneyProvider.Franc(2);
            var twoFrancs2 = MoneyProvider.Franc(2);

            Assert.AreEqual(twoFrancs1, twoFrancs2);
        }
Example #4
0
        public void Exchange_FiveFrancs_To_Francs_Result_FiveFrancs()
        {
            // Arrange
            var fiveFrancs = MoneyProvider.Franc(5);

            // Act
            var result = _exchanger.Exchange(fiveFrancs, Currency.CHF);

            // Assert
            Assert.AreEqual(fiveFrancs, result);
        }
Example #5
0
        public void ThreeFrancs_Times_Four_Equals_SixDollars()
        {
            // Arrange
            var threeFrancs = MoneyProvider.Franc(3);
            var sixDollars  = MoneyProvider.Dollar(6);

            // Act
            var product = _calculation.Product(threeFrancs, 4, Currency.USD);

            // Assert
            Assert.AreEqual(sixDollars, product);
        }
Example #6
0
        public void ThreeFrancs_Times_Four_Equals_TwelveFrancs()
        {
            // Arrange
            var threeFrancs  = MoneyProvider.Franc(3);
            var twelveFrancs = MoneyProvider.Franc(12);

            // Act
            var product = _calculation.Product(threeFrancs, 4, Currency.CHF);

            // Assert
            Assert.AreEqual(twelveFrancs, product);
        }
Example #7
0
        public void TwoDollars_Times_Three_Equals_TwelveFrancs()
        {
            // Arrange
            var twoDollars   = MoneyProvider.Dollar(2);
            var twelveFrancs = MoneyProvider.Franc(12);

            // Act
            var product = _calculation.Product(twoDollars, 3, Currency.CHF);

            // Assert
            Assert.AreEqual(twelveFrancs, product);
        }
Example #8
0
        public void Exchange_ThreeDollars_To_Francs_Result_SixFrancs()
        {
            // Arrange
            var dollars = MoneyProvider.Dollar(3);
            var franc   = MoneyProvider.Franc(6);

            // Act
            var result = _exchanger.Exchange(dollars, Currency.CHF);

            // Assert
            Assert.AreEqual(franc, result);
        }
Example #9
0
        public void Exchange_TwoFrancs_To_Dollars_Result_OneDollar()
        {
            // Arrange
            var twoFrancs = MoneyProvider.Franc(2);
            var oneDollar = MoneyProvider.Dollar(1);

            // Act
            var result = _exchanger.Exchange(twoFrancs, Currency.USD);

            // Assert
            Assert.AreEqual(oneDollar, result);
        }
Example #10
0
        public void SixFrancs_Plus_TwoDollars_Equals_TenFrancs()
        {
            // Arrange
            var sixFrancs  = MoneyProvider.Franc(6);
            var twoDollars = MoneyProvider.Dollar(2);

            var tenFrancs = MoneyProvider.Franc(10);

            // Act
            var sum = _calculation.Sum(sixFrancs, twoDollars, Currency.CHF);

            // Assert
            Assert.AreEqual(tenFrancs, sum);
        }
Example #11
0
        public void FiveDollars_Plus_TenFrancs_Equals_TwentyFrancs()
        {
            // Arrange
            var fiveDollars = MoneyProvider.Dollar(5);
            var tenFrancs   = MoneyProvider.Franc(10);

            var twentyFrancs = MoneyProvider.Franc(20);

            // Act
            var sum = _calculation.Sum(fiveDollars, tenFrancs, Currency.CHF);

            // Assert
            Assert.AreEqual(twentyFrancs, sum);
        }
Example #12
0
        public void SixFrancs_Plus_TwoFrancs_Equals_EightFrancs()
        {
            // Arrange
            var sixFrancs = MoneyProvider.Franc(6);
            var twoFrancs = MoneyProvider.Franc(2);

            var eightFrancs = MoneyProvider.Franc(8);

            // Act
            var sum = _calculation.Sum(sixFrancs, twoFrancs, Currency.CHF);

            // Assert
            Assert.AreEqual(eightFrancs, sum);
        }
Example #13
0
        public void SixFrancs_Plus_TwoDollars_Equals_FiveDollars()
        {
            // Arrange
            var sixFrancs  = MoneyProvider.Franc(6);
            var twoDollars = MoneyProvider.Dollar(2);

            var fiveDollars = MoneyProvider.Dollar(5);

            // Act
            var sum = _calculation.Sum(sixFrancs, twoDollars, Currency.USD);

            // Assert
            Assert.AreEqual(fiveDollars, sum);
        }
Example #14
0
        public void CreateFranc_CheckCurrency()
        {
            var fourFrancs = MoneyProvider.Franc(4);

            Assert.AreEqual(Currency.CHF, fourFrancs.Currency);
        }
Example #15
0
        public void CreateFranc_CheckAmount()
        {
            var fourFrancs = MoneyProvider.Franc(4);

            Assert.AreEqual(4, fourFrancs.Amount);
        }