This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
2017-05-03 06:52:14 +02:00
|
|
|
// Package that contains all api routes of this microservice
|
2017-04-04 23:21:05 +02:00
|
|
|
package http
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
2017-05-03 06:52:14 +02:00
|
|
|
// Function to test tempPercent() and tempProcessRadius()
|
2017-04-04 23:21:05 +02:00
|
|
|
func TestTempFuncs(t *testing.T) {
|
|
|
|
assert := assert.New(t)
|
2017-05-03 06:52:14 +02:00
|
|
|
resultInt := tempPercent(3, 9)
|
2017-04-04 23:21:05 +02:00
|
|
|
assert.Equal(33, resultInt)
|
|
|
|
|
|
|
|
// TODO is there a other way to calc this?
|
|
|
|
resultFloat := tempProcessRadius(3, 9, 0)
|
|
|
|
assert.Equal(float64(0), resultFloat)
|
|
|
|
}
|