21 lines
704 B
Go
21 lines
704 B
Go
package entity
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestPhoto_QualityScore(t *testing.T) {
|
|
t.Run("PhotoFixture19800101_000002_D640C559", func(t *testing.T) {
|
|
assert.Equal(t, 4, PhotoFixture19800101_000002_D640C559.QualityScore())
|
|
})
|
|
t.Run("PhotoFixturePhoto01 - favorite true - taken at before 2008", func(t *testing.T) {
|
|
assert.Equal(t, 7, PhotoFixturePhoto01.QualityScore())
|
|
})
|
|
t.Run("PhotoFixturePhoto06 - taken at after 2012 - resolution 2", func(t *testing.T) {
|
|
assert.Equal(t, 4, PhotoFixturePhoto06.QualityScore())
|
|
})
|
|
t.Run("PhotoFixturePhoto07 - score < 3 bit edited", func(t *testing.T) {
|
|
assert.Equal(t, 3, PhotoFixturePhoto07.QualityScore())
|
|
})
|
|
}
|