public void UpdateActivity_AllPropertiesValid_DoesNotThrowArgumentException() { //Arrange Mock <AccessTokenManagerBaseStub> tokenManager = new Mock <AccessTokenManagerBaseStub>(); BackgroundActivitiesEndpoint activityRequest = new BackgroundActivitiesEndpoint(tokenManager.Object, new UsersModel()); //Act and Assert Assert.DoesNotThrow(() => { activityRequest.UpdateActivity(ValidActivity); }); }
public void UpdateActivity_AllMeasurementsNull_ArgumentException() { //Arrange Mock <AccessTokenManagerBaseStub> tokenManager = new Mock <AccessTokenManagerBaseStub>(); BackgroundActivitiesEndpoint activityRequest = new BackgroundActivitiesEndpoint(tokenManager.Object, new UsersModel()); //Act ValidActivity.CaloriesBurned = null; ValidActivity.Steps = null; //Assert Assert.Throws(typeof(ArgumentException), () => { activityRequest.UpdateActivity(ValidActivity); }); }