public void CreateMeasurement_AllPropertiesValid_DoesNotThrowArgumentException()
 {
     //Arrange
     Mock<AccessTokenManagerBaseStub> tokenManager = new Mock<AccessTokenManagerBaseStub>();
     DiabetesMeasurementsEndpoint measurementRequest = new DiabetesMeasurementsEndpoint(tokenManager.Object, new UsersModel());
     //Act and Assert
     Assert.DoesNotThrow(() => { measurementRequest.CreateMeasurement(ValidMeasurementNew); });
 }
 public void DeleteMeasurementAsync_UriValid_DoesNotThrowArgumentException()
 {
     //Arrange
     var validPath = "/test/";
     Mock<AccessTokenManagerBaseStub> tokenManager = new Mock<AccessTokenManagerBaseStub>();
     DiabetesMeasurementsEndpoint measurementRequest = new DiabetesMeasurementsEndpoint(tokenManager.Object, new UsersModel { Diabetes = validPath });
     //Act and Assert
     Assert.DoesNotThrow(() => { measurementRequest.DeleteMeasurementAsync(() => { }, (ex) => { }, validPath); });
 }
 public void CreateMeasurement_AllMeasurementsNull_ArgumentException()
 {
     //Arrange
     Mock<AccessTokenManagerBaseStub> tokenManager = new Mock<AccessTokenManagerBaseStub>();
     DiabetesMeasurementsEndpoint measurementRequest = new DiabetesMeasurementsEndpoint(tokenManager.Object, new UsersModel());
     //Act
     ValidMeasurementNew.CPeptide = null;
     ValidMeasurementNew.FastingPlasmaGlucoseTest = null;
     ValidMeasurementNew.HemoglobinA1c = null;
     ValidMeasurementNew.Insulin = null;
     ValidMeasurementNew.OralGlucoseToleranceTest = null;
     ValidMeasurementNew.RandomPlasmaGlucoseTest = null;
     ValidMeasurementNew.Triglyceride = null;
     //Assert
     Assert.Throws(typeof(ArgumentException), () => { measurementRequest.CreateMeasurement(ValidMeasurementNew); });
 }
 public void DeleteMeasurement_UriNotValid_ArgumentException()
 {
     //Arrange
     var validPath = "/test/";
     Mock<AccessTokenManagerBaseStub> tokenManager = new Mock<AccessTokenManagerBaseStub>();
     DiabetesMeasurementsEndpoint measurementRequest = new DiabetesMeasurementsEndpoint(tokenManager.Object, new UsersModel { Diabetes = validPath });
     //Act and Assert
     Assert.Throws(typeof(ArgumentException), () => { measurementRequest.DeleteMeasurement("Not validPath."); });
 }