-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtilsTest.php
More file actions
95 lines (79 loc) · 2.24 KB
/
Copy pathUtilsTest.php
File metadata and controls
95 lines (79 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
use PHPUnit\Framework\TestCase;
require_once "Utils.php";
class UtilsTest extends TestCase
{
private $utils;
protected function setUp(): void
{
parent::setUp();
$this->utils = new Utils();
}
protected function tearDown(): void
{
$this->utils = NULL;
parent::tearDown();
}
//Test of User Requirement / Specification
//Equivalence Partitioning (+/-)
//Boundary Value Analysis / Limit Testing
//Decision Table
//Cause Effect Graph
//Error Guessing
//Test of User Requirement / Specification
//jika lebihd ari 90 maka dapat A
public function testGetMark_req1()
{
$grade = 91;
$mark = $this->utils->getMark($grade);
$this->assertEquals('A', $mark);
}
//Test of User Requirement / Specification
// jika lebih dari 80 maka dapat AB
public function testGetMark_req2()
{
$grade = 81;
$mark = $this->utils->getMark($grade);
$this->assertEquals('AB', $mark);
}
//Test of User Requirement / Specification
// jika lebih dari 70 maka dapat B
public function testGetMark_req3()
{
$grade = 71;
$mark = $this->utils->getMark($grade);
$this->assertEquals('B', $mark);
}
//Test of User Requirement / Specification
// jika lebih dari 60 maka dapat BC
public function testGetMark_req4()
{
$grade = 61;
$mark = $this->utils->getMark($grade);
$this->assertEquals('BC', $mark);
}
//Test of User Requirement / Specification
// jika lebih dari 50 maka dapat C
public function testGetMark_req5()
{
$grade = 51;
$mark = $this->utils->getMark($grade);
$this->assertEquals('C', $mark);
}
//Test of User Requirement / Specification
// jika lebih dari 40 maka dapat D
public function testGetMark_req6()
{
$grade = 41;
$mark = $this->utils->getMark($grade);
$this->assertEquals('D', $mark);
}
//Test of User Requirement / Specification
// jika kurang dari 40 maka dapat E
public function testGetMark_req7()
{
$grade = 39;
$mark = $this->utils->getMark($grade);
$this->assertEquals('E', $mark);
}
}