package geneticPrediction_test


import "seekia/internal/genetics/geneticPrediction"
import "seekia/internal/genetics/geneticPredictionModels"

import "testing"


// We test the encoding/decoding of a neural network object
func TestEncodeNeuralNetwork(t *testing.T){

	neuralNetworkObject, err := geneticPrediction.GetNewUntrainedNeuralNetworkObject("Eye Color")
	if (err != nil) {
		t.Fatal("GetNewUntrainedNeuralNetworkObject failed: " + err.Error())
	}

	neuralNetworkBytes, err := geneticPredictionModels.EncodeNeuralNetworkObjectToBytes(*neuralNetworkObject)
	if (err != nil){
		t.Fatal("EncodeNeuralNetworkObjectToBytes failed: " + err.Error())
	}

	_, err = geneticPredictionModels.DecodeBytesToNeuralNetworkObject(neuralNetworkBytes)
	if (err != nil){
		t.Fatal("DecodeBytesToNeuralNetworkObject failed: " + err.Error())
	}

	//TODO: Verify values are the same
}