Skip to content

Commit

Permalink
add missing attributes for beef production
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpochat committed Feb 15, 2024
1 parent cff2074 commit c510665
Show file tree
Hide file tree
Showing 4 changed files with 334 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void getBeefProduction_should_return_the_right_instance() {

// then
assertThat(beefProduction).isNotNull();
assertThat(beefProduction.getAnimalLiveWeight()).isEqualTo(400);
assertThat(beefProduction.getWarmCarcassWeight()).isEqualTo(400);
}

@Test
Expand Down
6 changes: 3 additions & 3 deletions backend/app/src/test/resources/sql/create_test_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,21 @@ values (1001, 'Un coli avec une majorité de steaks', 'Le coli cuisson rapide',
-- PRODUCTIONS AND PACKAGE LOTS -----
-------------------------------------

insert into beef_productions (id, production_type, producer_id, animal_identifier, animal_live_weight, animal_type, birth_date, birth_place, slaughter_date)
insert into beef_productions (id, production_type, producer_id, animal_identifier, warm_carcass_weight, animal_type, birth_date, birth_place, slaughter_date)
values (1000, 1, 1000, '1234', '400', null, '2022-01-13', 'Béchy', '2023-12-25');
insert into package_lots (id, description, label, net_weight, photo, quantity, quantity_sold, unit_price, production_id)
values (10000, 'Un coli avec un peu de tout', 'Le coli tradition', 10, null, 10, 2, 16, 1000);
insert into package_lots (id, description, label, net_weight, photo, quantity, quantity_sold, unit_price, production_id)
values (10001, 'Un coli avec une majorité de steaks', 'Le coli cuisson rapide', 7, null, 10, 3, 16, 1000);

insert into beef_productions (id, production_type, producer_id, animal_identifier, animal_live_weight, animal_type, birth_date, birth_place, slaughter_date)
insert into beef_productions (id, production_type, producer_id, animal_identifier, warm_carcass_weight, animal_type, birth_date, birth_place, slaughter_date)
values (1001, 1, 1000, '2345', '350', null, '2020-02-13', 'Béchy', '2023-11-03');
insert into package_lots (id, description, label, net_weight, photo, quantity, quantity_sold, unit_price, production_id)
values (10010, 'Un coli avec un peu de tout', 'Le coli tradition', 10, null, 12, 2, 16, 1001);
insert into package_lots (id, description, label, net_weight, photo, quantity, quantity_sold, unit_price, production_id)
values (10011, 'Un coli avec une majorité de steaks', 'Le coli cuisson rapide', 9, null, 10, 7, 16, 1001);

insert into beef_productions (id, production_type, producer_id, animal_identifier, animal_live_weight, animal_type, birth_date, birth_place, slaughter_date)
insert into beef_productions (id, production_type, producer_id, animal_identifier, warm_carcass_weight, animal_type, birth_date, birth_place, slaughter_date)
values (2000, 1, 2000, '3456', '450', null, '2021-03-15', 'Gruffy', '2024-01-05');
insert into package_lots (id, description, label, net_weight, photo, quantity, quantity_sold, unit_price, production_id)
values (20000, 'Un coli avec un peu de tout', 'Le coli tradition', 10, null, 7, 1, 16, 2000);
Expand Down
Loading

0 comments on commit c510665

Please sign in to comment.