package ru.r2cloud.jradio.chomptt;

import java.io.File;
import java.io.FileWriter;

import org.junit.Test;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import ru.r2cloud.jradio.fec.ViterbiTest;

public class ChompttBeaconTest {
	
	@Test
	public void testSpacecraftTelemetry() throws Exception {
		byte[] data = ViterbiTest.hexStringToByteArray("AE9264B0ACA860AE9264B0ACA860AE9264B0ACA86103F043484F4D50545C3C7E4F622D5E516224472E4F3A4F332C482121604C55212B6C3A40212674244D215F212F632160266B4E216F613B5221292A412321313C676822266F3755213230416D213C3C293C2121212327213F684643355B6D2E5E2B4F605E5935685C557E3E");
		ChompttBeacon result = new ChompttBeacon();
		result.readBeacon(data);
		
		Gson gson = new GsonBuilder().setPrettyPrinting().create();
		FileWriter w = new FileWriter(new File("./src/test/resources/expected/ChompttBeaconSpacecraft.json"));
		gson.toJson(result, w);
		w.close();
//		AssertJson.assertObjectsEqual("ChompttBeaconSpacecraft.json", result);

	}

}

@@ -40,139 +40,182 @@
 ort 
-java.io.File;%0Aimport java.io.FileWriter;%0A%0Aimport org.junit.Test;%0A%0Aimport com.google.gson.Gson;%0Aimport com.google.gson.GsonBuilder;%0A
+static pl.pojo.tester.api.assertion.Assertions.assertPojoMethodsFor;%0A%0Aimport org.junit.Test;%0A%0Aimport pl.pojo.tester.api.assertion.Method;%0Aimport ru.r2cloud.jradio.AssertJson;
 %0Aimp
@@ -743,293 +743,542 @@
 ;%0A%09%09
-%0A%09%09Gson gson = new GsonBuilder().
+AssertJson.assertObjectsEqual(%22ChompttBeaconSpacecraft.json%22, result);%0A%09%7D%0A%0A%09@Test%0A%09public void testPojo() %7B%0A%09%09as
 se
+r
 tP
-rettyPrinting().crea
+ojoMethodsFor(ChompttBeacon.class).testing(Method.GETTER, Method.SETTER).areWellImplemen
 te
+d
 ();%0A%09%09
-FileWriter w = new FileWriter(new File(%22./src/test/resources/expected/ChompttBeaconSpacecraft.json%22));%0A%09%09gson.toJson(result, w);%0A%09%09w.close
+assertPojoMethodsFor(PayloadTelemetry.class).testing(Method.GETTER, Method.SETTER).areWellImplemented();%0A%09%09assertPojoMethodsFor(SpacecraftTelemetry.class).testing(Method.GETTER, Method.SETTER).areWellImplemented
 ();%0A
-//
 %09%09
-A
+a
 ssert
-Json.assertObjectsEqual(%22ChompttBeaconSpacecraft.json%22, result
+PojoMethodsFor(ChannelStatus.class).testing(Method.GETTER, Method.SETTER).areWellImplemented(
 );%0A
-%0A
 %09%7D%0A
-%0A
 %7D%0A

fix the test + add some new