Exemplo n.º 1
0
        public void TotalPointsOfPurchase21Dollars47Cents_ShouldReturn215Points()
        {
            // Arrange
            CartsController controllerContext    = new CartsController(context, hostEnvironment);
            double          cartTotal            = 21.47;
            double          pointsShouldRetrieve = 215;

            // Act
            double realPointValue = controllerContext.PointsEarned(cartTotal);

            // Arrange
            Assert.Equal(pointsShouldRetrieve, realPointValue);
        }
Exemplo n.º 2
0
        public void TotalPointsOfPurchaseIfNegativeValues_ShouldStillFunctionAndNotCauseErrors()
        {
            // Arrange
            CartsController controllerContext    = new CartsController(context, hostEnvironment);
            double          cartTotal            = -21.47;
            double          pointsShouldRetrieve = -215;

            // Act
            double realPointValue = controllerContext.PointsEarned(cartTotal);


            // Arrange
            Assert.Equal(pointsShouldRetrieve, realPointValue);
        }