Exemplo n.º 1
0
        public void testMultiplication()
        {
            Dollar five = Money.dollar(5);

            Assert.AreEqual(Money.dollar(10), five.times(2));
            Assert.AreEqual(Money.dollar(15), five.times(3));
        }
Exemplo n.º 2
0
        public void testMultiplication()
        {
            Dollar five = new Dollar(5);

            Assert.Equal(new Dollar(10), five.times(2));

            Assert.Equal(new Dollar(15), five.times(3));
        }
Exemplo n.º 3
0
        public void testMultiplication()
        {
            Dollar five    = new Dollar(5);
            Dollar product = five.times(2);

            Assert.Equal(10, product.amount);
            product = five.times(3);
            Assert.Equal(15, product.amount);
        }
Exemplo n.º 4
0
        public void testMultiplication()
        {
            // Arrange
            Dollar five = new Dollar(5);

            // Assert
            Assert.True(new Dollar(10).equals(five.times(2)));
            // Assert
            Assert.True(new Dollar(15).equals(five.times(3)));
        }
Exemplo n.º 5
0
        public void testMultiplication()
        {
            // Arrange
            Dollar five = new Dollar(5);

            // Act
            var product = five.times(2);

            // Assert
            Assert.Equal(10, product.amount);

            // Act
            product = five.times(3);

            // Assert
            Assert.Equal(15, product.amount);
        }
Exemplo n.º 6
0
        public void testMultiplication()
        {
            // Arrange
            Dollar five = new Dollar(5);

            // Act
            five.times(2);

            // Assert
            Assert.Equal(10, five.amount);
        }
Exemplo n.º 7
0
        public void testMultiplication()
        {
            //first test
            //arrange
            Dollar five    = new Dollar(5);
            Dollar product = (Dollar)five.Clone();

            //act
            product.times(2);
            //assert
            Assert.AreEqual(10, product.amount);

            //second test
            //arrange
            product = (Dollar)five.Clone();;
            //act
            product.times(3);
            //assert
            Assert.AreEqual(15, product.amount);
        }