Skip to content

Commit

Permalink
ViewAllModel er Unit test done..Total 10 ta test korchi ..sob passed …
Browse files Browse the repository at this point in the history
….yeah!
  • Loading branch information
Mofazzal874 committed May 23, 2024
1 parent e44aba0 commit 843ec77
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,24 @@ public void testNullAndEmptyVal() {
assertNull(viewAllModel.getType());
assertEquals("", viewAllModel.getDiscount());
}
//extreme values check -sets the price to extreme values (maximum and minimum possible values), ensuring the model can handle these edge cases.
@Test
public void testExtremeValues() {
viewAllModel.setPrice(Double.MAX_VALUE);
assertEquals(Double.MAX_VALUE, viewAllModel.getPrice(), 0.0);

viewAllModel.setPrice(Double.MIN_VALUE);
assertEquals(Double.MIN_VALUE, viewAllModel.getPrice(), 0.0);
}

//eita diya extreme case check korlam ,Sets the price to boundary values (zero and negative), testing how the model handles these.
@Test
public void testBoundaryVal() {
viewAllModel.setPrice(0);
assertEquals(0, viewAllModel.getPrice(), 0.0);

viewAllModel.setPrice(-1);
assertEquals(-1, viewAllModel.getPrice(), 0.0);
}

}

0 comments on commit 843ec77

Please sign in to comment.