public void CreateNutrition_AllPropertiesValid_DoesNotThrowArgumentException()
 {
     //Arrange
     Mock<AccessTokenManagerBaseStub> tokenManager = new Mock<AccessTokenManagerBaseStub>();
     NutritionEndpoint nutritionRequest = new NutritionEndpoint(tokenManager.Object, new UsersModel());
     //Act and Assert
     Assert.DoesNotThrow(() => { nutritionRequest.CreateNutrition(ValidNutritionNew); });
 }
 public void DeleteNutritionAsync_UriValid_DoesNotThrowArgumentException()
 {
     //Arrange
     var validPath = "/test/";
     Mock<AccessTokenManagerBaseStub> tokenManager = new Mock<AccessTokenManagerBaseStub>();
     NutritionEndpoint nutritionRequest = new NutritionEndpoint(tokenManager.Object, new UsersModel { Nutrition = validPath });
     //Act and assert
     Assert.DoesNotThrow(() => { nutritionRequest.DeleteNutritionAsync(() => { }, (ex) => { }, validPath); });
 }
 public void CreateNutrition_AllMeasurementsNull_ArgumentException()
 {
     //Arrange
     Mock<AccessTokenManagerBaseStub> tokenManager = new Mock<AccessTokenManagerBaseStub>();
     NutritionEndpoint nutritionRequest = new NutritionEndpoint(tokenManager.Object, new UsersModel());
     //Act
     ValidNutritionNew.Calories = null;
     ValidNutritionNew.Carbohydrates = null;
     ValidNutritionNew.Fat = null;
     ValidNutritionNew.Fiber = null;
     ValidNutritionNew.Protein = null;
     ValidNutritionNew.Sodium = null;
     ValidNutritionNew.Water = null;
     //Assert
     Assert.Throws(typeof(ArgumentException), () => { nutritionRequest.CreateNutrition(ValidNutritionNew); });
 }
 public void DeleteNutrition_UriNotValid_ArgumentException()
 {
     //Arrange
     var validPath = "/test/";
     Mock<AccessTokenManagerBaseStub> tokenManager = new Mock<AccessTokenManagerBaseStub>();
     NutritionEndpoint nutritionRequest = new NutritionEndpoint(tokenManager.Object, new UsersModel { Nutrition = validPath });
     //Act and assert
     Assert.Throws(typeof(ArgumentException), () => { nutritionRequest.DeleteNutrition("Not validPath."); });
 }