TheMathemagicians/sevenkeys/logic/locate_test.go

26 lines
662 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
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)
}
}