GymRat-s-Logbook / GymRats-Logbook-Backend

1 stars 1 forks source link

As a not logged I would like to be able to count my BMR #5

Closed McBlankenburg closed 1 year ago

McBlankenburg commented 1 year ago

User story: As a not logged I would like to be able to call the backend with data for information about my BMR

BmrNotLoggedRequest { sex: GenderEnum dateOfBirth: LocalDate weight: float, height: float, physicalActivityLevel: PhysicalActivityLevelEnum }

BmrNotLoggedResponse { status: int message: String body: String }

image

-basis receive feedback containing the appropriate http-code https://http.cat/ and BMI coefficient. -it is up to the programmer to choose the appropriate BMR counting algorithm.

should be implemented:

BmrNotLoggedRequest BmrNotLoggedResponse PhysicalActivityLevelEnum Unit-tests for counting BMR are required in BDD style (BDDMockito + AssertJ or Junit) -convention //given //when //then example --> https://github.com/Simple-as-Coding/tutoring-platform/blob/develop/src/test/java/pl/simpleascoding/tutoringplatform/user/UserServiceImplTest.java

Julia0321 commented 1 year ago

To calculate BMR isn't needed Physical Activity Level as same BMI, It's not needed Gender. So I changed this two cases. Activity Level and gender is needed to ,,Total daily caloric needs".

Julia0321 commented 1 year ago

Also I changed (in calculateBmi method) height from centimeters to meters.