26 lines
662 B
Go
26 lines
662 B
Go
|
package logic
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func Test_GetBinderLocationDescription_ReturnsCorrectFormat_ForFrontSlots(t *testing.T) {
|
||
|
var position int = 24
|
||
|
var expected string = "on page 2 in front slot 6"
|
||
|
|
||
|
description := GetBinderLocationDescription(position)
|
||
|
|
||
|
if description != expected {
|
||
|
t.Errorf("expected %s, got %s\n", expected, description)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func Test_GetBinderLocationDescription_ReturnsCorrectFormat_ForBackSlots(t *testing.T) {
|
||
|
var position int = 17
|
||
|
var expected string = "on page 1 in back slot 8"
|
||
|
|
||
|
description := GetBinderLocationDescription(position)
|
||
|
|
||
|
if description != expected {
|
||
|
t.Errorf("expected %s, got %s\n", expected, description)
|
||
|
}
|
||
|
}
|