Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuele Gallone committed Mar 10, 2022
1 parent 78a8373 commit df35a46
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
18 changes: 9 additions & 9 deletions pkg/pfcpsim/session/qer_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ package session
import "github.com/wmnsk/go-pfcp/ie"

type qerBuilder struct {
method IEMethod
qerID uint32
qfi uint8
isMbrSet bool
ulMbr uint64
dlMbr uint64
isGbrSet bool
ulGbr uint64
method IEMethod
qerID uint32
qfi uint8
isMbrSet bool
ulMbr uint64
dlMbr uint64
isGbrSet bool
ulGbr uint64
dlGbr uint64
gateStatus GateStatus
gateStatus uint8

isIDSet bool
}
Expand Down
15 changes: 14 additions & 1 deletion pkg/pfcpsim/session/qer_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,20 @@ func TestQERBuilder(t *testing.T) {
ie.NewQFI(2),
ie.NewGateStatus(0, 0),
),
description: "Valid Create QER",
description: "Valid Create QER with gate open",
},
{
input: NewQERBuilder().
WithID(1).
WithMethod(Create).
WithQFI(2).
WithGateStatus(ie.GateStatusClosed),
expected: ie.NewCreateQER(
ie.NewQERID(1),
ie.NewQFI(2),
ie.NewGateStatus(1, 1),
),
description: "Valid Create QER with Gate closed",
},
{
input: NewQERBuilder().
Expand Down

0 comments on commit df35a46

Please sign in to comment.