TheMathemagicians/sevenkeys/logic/locate_test.go

26 lines
664 B
Go
Raw Normal View History

2024-09-07 23:24:24 +00:00
package logic
import "testing"
func Test_GetBinderLocationDescription_ReturnsCorrectFormat_ForFrontSlots(t *testing.T) {
var position int = 24
2024-09-12 12:31:42 +00:00
var expected string = " on page 2 in front slot 6"
2024-09-07 23:24:24 +00:00
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
2024-09-12 12:31:42 +00:00
var expected string = " on page 1 in back slot 8"
2024-09-07 23:24:24 +00:00
description := GetBinderLocationDescription(position)
if description != expected {
t.Errorf("expected %s, got %s\n", expected, description)
}
}