@@ -0,0 +1,1471 @@
+/*%0ACopyright 2016 S7connector members (github.com/s7connector)%0A%0ALicensed under the Apache License, Version 2.0 (the %22License%22);%0Ayou may not use this file except in compliance with the License.%0AYou may obtain a copy of the License at%0A%0A  http://www.apache.org/licenses/LICENSE-2.0%0A%0AUnless required by applicable law or agreed to in writing, software%0Adistributed under the License is distributed on an %22AS IS%22 BASIS,%0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0ASee the License for the specific language governing permissions and%0Alimitations under the License.%0A*/%0Apackage com.github.s7connector.test;%0A%0Aimport com.github.s7connector.api.S7Serializer;%0Aimport com.github.s7connector.api.annotation.Datablock;%0Aimport com.github.s7connector.api.annotation.S7Variable;%0Aimport com.github.s7connector.api.factory.S7SerializerFactory;%0Aimport com.github.s7connector.impl.utils.S7Type;%0Aimport com.github.s7connector.test.connector.EchoConnector;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Apublic class DWORDSerializerTest %7B%0A%0A%0A%09@Test%0A%09public void test() %7B%0A%09%09EchoConnector c = new EchoConnector();%0A%09%09%0A%09%09S7Serializer p = S7SerializerFactory.buildSerializer(c);%0A%0A%09%09/*%0A%09%09 * first level%0A%09%09 */%0A%09%09%0A%09%09MyDB in = new MyDB();%0A%09%09in.l = 123L;%0A%0A%09%09p.store(in, 0, 0);%0A%09%09%0A%09%09MyDB out = p.dispense(MyDB.class, 0, 0);%0A%09%09%0A%09%09Assert.assertEquals(in.l, out.l);%0A%0A%09%7D%0A%09%0A%09@Datablock%0A%09public static class MyDB %7B%0A%09%09@S7Variable(type=S7Type.DWORD, byteOffset=0)%0A%09%09public long l;%0A%09%7D%0A%7D%0A

test case for #53