public void CreateActivity_AllPropertiesValid_DoesNotThrowArgumentException()
        {
            //Arrange
            Mock <AccessTokenManagerBaseStub> tokenManager    = new Mock <AccessTokenManagerBaseStub>();
            BackgroundActivitiesEndpoint      activityRequest = new BackgroundActivitiesEndpoint(tokenManager.Object, new UsersModel());

            //Act and Assert
            Assert.DoesNotThrow(() => { activityRequest.CreateActivity(ValidActivityNew); });
        }
        public void GetActivityAsync_UriNotValid_ArgumentException()
        {
            //Arrange
            var validPath = "/test/";
            Mock <AccessTokenManagerBaseStub> tokenManager    = new Mock <AccessTokenManagerBaseStub>();
            BackgroundActivitiesEndpoint      activityRequest = new BackgroundActivitiesEndpoint(tokenManager.Object, new UsersModel {
                BackgroundActivities = validPath
            });

            //Act and Assert
            Assert.Throws(typeof(ArgumentException), () => { activityRequest.GetActivityAsync((m) => { }, (ex) => { }, "Not validPath."); });
        }
        public void GetActivity_UriValid_DoesNotThrowArgumentException()
        {
            //Arrange
            var validPath = "/test/";
            Mock <AccessTokenManagerBaseStub> tokenManager    = new Mock <AccessTokenManagerBaseStub>();
            BackgroundActivitiesEndpoint      activityRequest = new BackgroundActivitiesEndpoint(tokenManager.Object, new UsersModel {
                BackgroundActivities = validPath
            });

            //Act and Assert
            Assert.DoesNotThrow(() => { activityRequest.GetActivity(validPath); });
        }
        public void CreateActivity_AllMeasurementsNull_ArgumentException()
        {
            //Arrange
            Mock <AccessTokenManagerBaseStub> tokenManager    = new Mock <AccessTokenManagerBaseStub>();
            BackgroundActivitiesEndpoint      activityRequest = new BackgroundActivitiesEndpoint(tokenManager.Object, new UsersModel());

            //Act
            ValidActivityNew.CaloriesBurned = null;
            ValidActivityNew.Steps          = null;
            //Assert
            Assert.Throws(typeof(ArgumentException), () => { activityRequest.CreateActivity(ValidActivityNew); });
        }