Ejemplo n.º 1
0
        public void TEST_002_Get_Points_For_Logged_In_User()
        {
            var response = service.GetPoints();

            response.Expect(HttpStatusCode.Accepted);
            Points = response.Entity.Value;
        }
Ejemplo n.º 2
0
        public void TEST_003_Get_Points_For_Logged_In_User()
        {
            var points        = service.GetPoints();
            int pointsBalance = points.Entity.Value;

            Assert.IsNotNull(pointsBalance);
        }
Ejemplo n.º 3
0
        public void TEST_002_Get_Points_For_Logged_In_User()
        {
            var points = service.GetPoints();

            Console.WriteLine("points : " + points.Entity.Value);
            points.Expect(HttpStatusCode.Accepted);
        }
Ejemplo n.º 4
0
        public void TEST_002_Get_Points_For_Logged_In_User()
        {
            //Act
            var points = _service.GetPoints();

            //Assert
            points.Expect(HttpStatusCode.Accepted, "Failed to get points");

            // Set value for the context variable
            _context.PointsBeforePurchase = points.Entity.Value;
        }
Ejemplo n.º 5
0
        public void TEST_003GetPointsForLoggedInUser()
        {
            var points = service.GetPoints();
            int userId = points.Entity.UserId;
            int point  = points.Entity.Value;

            //Assert
            points.Expect(HttpStatusCode.Accepted);
            //Verifying points earned are not null as points are added after each purchase
            Assert.IsNotNull(point);
            Assert.IsNotNull(userId);
            Assert.AreEqual(1, userId);
        }
Ejemplo n.º 6
0
        public void TEST_002_Get_Points_For_Logged_In_User()
        {
            var points = service.GetPoints();

            // Validating reponse code
            points.Expect(HttpStatusCode.Accepted);

            //var point = points.Entity.Value;
            int uId = points.Entity.UserId;

            // int point = points.Entity.Value;
            //Console.WriteLine(uId);

            // Customer's current points
            Console.WriteLine("point:" + points.Entity.Value);

            //Validating correct user is getting the reponse back
            Assert.That(uId, Is.EqualTo(1), "Incorrect userid");
        }
Ejemplo n.º 7
0
        public void TEST_002_Get_Points_For_Logged_In_User()
        {
            var points = service.GetPoints();

            points.Expect(HttpStatusCode.Accepted);
        }
Ejemplo n.º 8
0
        public void TEST_003_Get_Points_For_Logged_In_User()
        {
            var points = service.GetPoints();

            TestContext.WriteLine("StatusCode is : " + (int)points.StatusCode);
        }