From 96bcbc26d68c62e4eddb04e0d9b9d124500616dc Mon Sep 17 00:00:00 2001 From: Jenkins Date: Wed, 20 Nov 2019 15:06:33 +0100 Subject: [PATCH] added tests --- .../examples/dhell/HelloAppTest.java | 1157 +++++++++++++++-- .../examples/dhell/MyStorageTest.java | 726 +++++++++-- 2 files changed, 1665 insertions(+), 218 deletions(-) diff --git a/src/test/java/eu/stamp_project/examples/dhell/HelloAppTest.java b/src/test/java/eu/stamp_project/examples/dhell/HelloAppTest.java index b345d29..86ea460 100644 --- a/src/test/java/eu/stamp_project/examples/dhell/HelloAppTest.java +++ b/src/test/java/eu/stamp_project/examples/dhell/HelloAppTest.java @@ -1,199 +1,1156 @@ package eu.stamp_project.examples.dhell; -import static org.junit.Assert.*; + +import java.io.File; +import org.junit.Assert; import org.junit.BeforeClass; -import org.junit.AfterClass; import org.junit.Test; -import java.io.File; -import eu.stamp_project.examples.dhell.HelloApp; -public class HelloAppTest -{ - // ********************************************************************** - // public - // ********************************************************************** +public class HelloAppTest { @BeforeClass - public static void runOnceAtTheBeginning() - { - System.out.println("dhell.HelloAppTest: @BeforeClass - runOnceAtTheBeginning"); + public static void runOnceAtTheBeginning() { + System.out.println("dhell.HelloAppTest: @BeforeClass - runOnceAtTheBeginning"); } - @AfterClass - public static void runOnceAtTheEnd() - { - System.out.println("dhell.HelloAppTest: @AfterClass - runOnceAtTheEnd"); + @org.junit.AfterClass + public static void runOnceAtTheEnd() { + System.out.println("dhell.HelloAppTest: @AfterClass - runOnceAtTheEnd"); } - @Test - public void testHelloAppDefault() throws Exception - { + @Test(timeout = 10000) + public void testHelloAppDefault() throws Exception { HelloApp myApp = null; + Assert.assertNull(myApp); File theFile = null; - myApp = new HelloApp(); - assertEquals(1, myApp.getMyPrintCount()); - assertEquals("myHelloApp.traces", myApp.getMyTracesName()); - assertEquals(0, myApp.cardMyTraces()); - assertTrue(myApp.returnSomething() > 0); - + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.getMyPrintCount(); + myApp.getMyTracesName(); + int o_testHelloAppDefault__7 = myApp.cardMyTraces(); + Assert.assertEquals(0, ((int) (o_testHelloAppDefault__7))); + boolean boolean_0 = (myApp.returnSomething()) > 0; theFile = new File(myApp.getMyTracesName()); - assertEquals(false, theFile.exists()); + boolean o_testHelloAppDefault__13 = theFile.exists(); + Assert.assertFalse(o_testHelloAppDefault__13); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(0, ((int) (o_testHelloAppDefault__7))); } - @Test - public void testHelloAppInt() throws Exception - { + @Test(timeout = 10000) + public void testHelloAppInt() throws Exception { HelloApp myApp = null; + Assert.assertNull(myApp); File theFile = null; int myCount = 8; + Assert.assertEquals(8, ((int) (myCount))); + myApp = new HelloApp(myCount); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.getMyPrintCount(); + myApp.getMyTracesName(); + int o_testHelloAppInt__8 = myApp.cardMyTraces(); + Assert.assertEquals(0, ((int) (o_testHelloAppInt__8))); + theFile = new File(myApp.getMyTracesName()); + boolean o_testHelloAppInt__12 = theFile.exists(); + Assert.assertFalse(o_testHelloAppInt__12); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(8, ((int) (myCount))); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(0, ((int) (o_testHelloAppInt__8))); + } + @Test(timeout = 10000) + public void testHelloAppInt_literalMutationNumber73() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + int myCount = 4; + Assert.assertEquals(4, ((int) (myCount))); myApp = new HelloApp(myCount); - assertEquals(myCount, myApp.getMyPrintCount()); - assertEquals("myHelloApp.traces", myApp.getMyTracesName()); - assertEquals(0, myApp.cardMyTraces()); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(4, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.getMyPrintCount(); + myApp.getMyTracesName(); + int o_testHelloAppInt_literalMutationNumber73__9 = myApp.cardMyTraces(); + Assert.assertEquals(0, ((int) (o_testHelloAppInt_literalMutationNumber73__9))); + theFile = new File(myApp.getMyTracesName()); + boolean o_testHelloAppInt_literalMutationNumber73__13 = theFile.exists(); + Assert.assertFalse(o_testHelloAppInt_literalMutationNumber73__13); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(4, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(4, ((int) (myCount))); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(4, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(0, ((int) (o_testHelloAppInt_literalMutationNumber73__9))); + } + @Test(timeout = 10000) + public void testHelloAppInt_literalMutationNumber74() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + int myCount = 16; + Assert.assertEquals(16, ((int) (myCount))); + myApp = new HelloApp(myCount); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(16, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.getMyPrintCount(); + myApp.getMyTracesName(); + int o_testHelloAppInt_literalMutationNumber74__9 = myApp.cardMyTraces(); + Assert.assertEquals(0, ((int) (o_testHelloAppInt_literalMutationNumber74__9))); theFile = new File(myApp.getMyTracesName()); - assertEquals(false, theFile.exists()); + boolean o_testHelloAppInt_literalMutationNumber74__13 = theFile.exists(); + Assert.assertFalse(o_testHelloAppInt_literalMutationNumber74__13); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(16, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(16, ((int) (myCount))); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(16, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(0, ((int) (o_testHelloAppInt_literalMutationNumber74__9))); } - @Test - public void testHelloAppString() throws Exception - { + @Test(timeout = 10000) + public void testHelloAppString() throws Exception { HelloApp myApp = null; + Assert.assertNull(myApp); File theFile = null; String MyTracesName = "foo1.traces"; + Assert.assertEquals("foo1.traces", MyTracesName); + myApp = new HelloApp(MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo1.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.getMyPrintCount(); + myApp.getMyTracesName(); + int o_testHelloAppString__8 = myApp.cardMyTraces(); + Assert.assertEquals(0, ((int) (o_testHelloAppString__8))); + theFile = new File(myApp.getMyTracesName()); + boolean o_testHelloAppString__12 = theFile.exists(); + Assert.assertFalse(o_testHelloAppString__12); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo1.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("foo1.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo1.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(0, ((int) (o_testHelloAppString__8))); + } + @Test(timeout = 10000) + public void testHelloAppString_literalMutationString370() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + String MyTracesName = ""; + Assert.assertEquals("", MyTracesName); myApp = new HelloApp(MyTracesName); - assertEquals(1, myApp.getMyPrintCount()); - assertEquals(MyTracesName, myApp.getMyTracesName()); - assertEquals(0, myApp.cardMyTraces()); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.getMyPrintCount(); + myApp.getMyTracesName(); + int o_testHelloAppString_literalMutationString370__8 = myApp.cardMyTraces(); + Assert.assertEquals(0, ((int) (o_testHelloAppString_literalMutationString370__8))); + theFile = new File(myApp.getMyTracesName()); + boolean o_testHelloAppString_literalMutationString370__12 = theFile.exists(); + Assert.assertFalse(o_testHelloAppString_literalMutationString370__12); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(0, ((int) (o_testHelloAppString_literalMutationString370__8))); + } + @Test(timeout = 10000) + public void testHelloAppString_literalMutationString371() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + String MyTracesName = "---------------------- Hello World !"; + Assert.assertEquals("---------------------- Hello World !", MyTracesName); + myApp = new HelloApp(MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("---------------------- Hello World !", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.getMyPrintCount(); + myApp.getMyTracesName(); + int o_testHelloAppString_literalMutationString371__8 = myApp.cardMyTraces(); + Assert.assertEquals(0, ((int) (o_testHelloAppString_literalMutationString371__8))); theFile = new File(myApp.getMyTracesName()); - assertEquals(false, theFile.exists()); + boolean o_testHelloAppString_literalMutationString371__12 = theFile.exists(); + Assert.assertFalse(o_testHelloAppString_literalMutationString371__12); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("---------------------- Hello World !", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("---------------------- Hello World !", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("---------------------- Hello World !", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(0, ((int) (o_testHelloAppString_literalMutationString371__8))); } - @Test - public void testHelloAppIntString() throws Exception - { + @Test(timeout = 10000) + public void testHelloAppIntString() throws Exception { HelloApp myApp = null; + Assert.assertNull(myApp); File theFile = null; int myCount = 8; + Assert.assertEquals(8, ((int) (myCount))); String MyTracesName = "foo2.traces"; + Assert.assertEquals("foo2.traces", MyTracesName); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo2.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.getMyPrintCount(); + myApp.getMyTracesName(); + int o_testHelloAppIntString__9 = myApp.cardMyTraces(); + Assert.assertEquals(0, ((int) (o_testHelloAppIntString__9))); + theFile = new File(myApp.getMyTracesName()); + boolean o_testHelloAppIntString__13 = theFile.exists(); + Assert.assertFalse(o_testHelloAppIntString__13); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo2.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(8, ((int) (myCount))); + Assert.assertEquals("foo2.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo2.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(0, ((int) (o_testHelloAppIntString__9))); + } + @Test(timeout = 10000) + public void testHelloAppIntString_literalMutationNumber93() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + int myCount = 4; + Assert.assertEquals(4, ((int) (myCount))); + String MyTracesName = "foo2.traces"; + Assert.assertEquals("foo2.traces", MyTracesName); myApp = new HelloApp(myCount, MyTracesName); - assertEquals(myCount, myApp.getMyPrintCount()); - assertEquals(MyTracesName, myApp.getMyTracesName()); - assertEquals(0, myApp.cardMyTraces()); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(4, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo2.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.getMyPrintCount(); + myApp.getMyTracesName(); + int o_testHelloAppIntString_literalMutationNumber93__10 = myApp.cardMyTraces(); + Assert.assertEquals(0, ((int) (o_testHelloAppIntString_literalMutationNumber93__10))); + theFile = new File(myApp.getMyTracesName()); + boolean o_testHelloAppIntString_literalMutationNumber93__14 = theFile.exists(); + Assert.assertFalse(o_testHelloAppIntString_literalMutationNumber93__14); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(4, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo2.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(4, ((int) (myCount))); + Assert.assertEquals("foo2.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(4, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo2.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(0, ((int) (o_testHelloAppIntString_literalMutationNumber93__10))); + } + @Test(timeout = 10000) + public void testHelloAppIntString_literalMutationString98() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + int myCount = 8; + Assert.assertEquals(8, ((int) (myCount))); + String MyTracesName = ""; + Assert.assertEquals("", MyTracesName); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.getMyPrintCount(); + myApp.getMyTracesName(); + int o_testHelloAppIntString_literalMutationString98__9 = myApp.cardMyTraces(); + Assert.assertEquals(0, ((int) (o_testHelloAppIntString_literalMutationString98__9))); theFile = new File(myApp.getMyTracesName()); - assertEquals(false, theFile.exists()); + boolean o_testHelloAppIntString_literalMutationString98__13 = theFile.exists(); + Assert.assertFalse(o_testHelloAppIntString_literalMutationString98__13); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(8, ((int) (myCount))); + Assert.assertEquals("", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals(0, ((int) (o_testHelloAppIntString_literalMutationString98__9))); } - @Test - public void testHelloAppRun1() throws Exception - { + @Test(timeout = 10000) + public void testHelloAppRun1() throws Exception { HelloApp myApp = null; + Assert.assertNull(myApp); File theFile = null; MyStorage fileContent = null; + Assert.assertNull(fileContent); String countString; - // String message; - myApp = new HelloApp(); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); myApp.run(); + theFile = new File(myApp.getMyTracesName()); + countString = Integer.toString(myApp.getMyPrintCount()); + Assert.assertEquals("1", countString); + boolean o_testHelloAppRun1__17 = theFile.exists(); + Assert.assertTrue(o_testHelloAppRun1__17); + boolean o_testHelloAppRun1__18 = countString.equals(myApp.getMyTraces().getData(0)); + Assert.assertTrue(o_testHelloAppRun1__18); + fileContent = new MyStorage(myApp.getMyTracesName()); + Assert.assertEquals(0, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (fileContent)).getFileName()); + fileContent.readData(); + boolean o_testHelloAppRun1__25 = fileContent.isEqual(myApp.getMyTraces()); + Assert.assertTrue(o_testHelloAppRun1__25); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals("1", countString); + Assert.assertTrue(o_testHelloAppRun1__17); + Assert.assertTrue(o_testHelloAppRun1__18); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (fileContent)).getFileName()); + } - // message = "#### TracesName = " + myApp.getMyTracesName(); - // System.out.println(message); - + @Test(timeout = 10000) + public void testHelloAppRun1_literalMutationNumber137() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + MyStorage fileContent = null; + Assert.assertNull(fileContent); + String countString; + myApp = new HelloApp(); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.run(); theFile = new File(myApp.getMyTracesName()); countString = Integer.toString(myApp.getMyPrintCount()); - assertEquals(true, theFile.exists()); - assertEquals(true, countString.equals(myApp.getMyTraces().getData(0))); + Assert.assertEquals("1", countString); + boolean o_testHelloAppRun1_literalMutationNumber137__17 = theFile.exists(); + Assert.assertTrue(o_testHelloAppRun1_literalMutationNumber137__17); + boolean o_testHelloAppRun1_literalMutationNumber137__18 = countString.equals(myApp.getMyTraces().getData(1)); + Assert.assertFalse(o_testHelloAppRun1_literalMutationNumber137__18); + fileContent = new MyStorage(myApp.getMyTracesName()); + Assert.assertEquals(0, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (fileContent)).getFileName()); + fileContent.readData(); + boolean o_testHelloAppRun1_literalMutationNumber137__26 = fileContent.isEqual(myApp.getMyTraces()); + Assert.assertTrue(o_testHelloAppRun1_literalMutationNumber137__26); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals("1", countString); + Assert.assertTrue(o_testHelloAppRun1_literalMutationNumber137__17); + Assert.assertFalse(o_testHelloAppRun1_literalMutationNumber137__18); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (fileContent)).getFileName()); + } + @Test(timeout = 10000) + public void testHelloAppRun1_literalMutationNumber139() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + MyStorage fileContent = null; + Assert.assertNull(fileContent); + String countString; + myApp = new HelloApp(); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.run(); + theFile = new File(myApp.getMyTracesName()); + countString = Integer.toString(myApp.getMyPrintCount()); + Assert.assertEquals("1", countString); + boolean o_testHelloAppRun1_literalMutationNumber139__17 = theFile.exists(); + Assert.assertTrue(o_testHelloAppRun1_literalMutationNumber139__17); + boolean o_testHelloAppRun1_literalMutationNumber139__18 = countString.equals(myApp.getMyTraces().getData(0)); + Assert.assertTrue(o_testHelloAppRun1_literalMutationNumber139__18); fileContent = new MyStorage(myApp.getMyTracesName()); + Assert.assertEquals(0, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (fileContent)).getFileName()); fileContent.readData(); - assertEquals(true, fileContent.isEqual(myApp.getMyTraces())); + boolean o_testHelloAppRun1_literalMutationNumber139__26 = fileContent.isEqual(myApp.getMyTraces()); + Assert.assertTrue(o_testHelloAppRun1_literalMutationNumber139__26); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(1, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("myHelloApp.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals("1", countString); + Assert.assertTrue(o_testHelloAppRun1_literalMutationNumber139__17); + Assert.assertTrue(o_testHelloAppRun1_literalMutationNumber139__18); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("myHelloApp.traces", ((MyStorage) (fileContent)).getFileName()); } - @Test - public void testHelloAppRun2() throws Exception - { + @Test(timeout = 10000) + public void testHelloAppRun1_literalMutationNumber138_failAssert0() throws Exception { + try { + HelloApp myApp = null; + File theFile = null; + MyStorage fileContent = null; + String countString; + myApp = new HelloApp(); + myApp.run(); + theFile = new File(myApp.getMyTracesName()); + countString = Integer.toString(myApp.getMyPrintCount()); + theFile.exists(); + countString.equals(myApp.getMyTraces().getData(-1)); + fileContent = new MyStorage(myApp.getMyTracesName()); + fileContent.readData(); + fileContent.isEqual(myApp.getMyTraces()); + org.junit.Assert.fail("testHelloAppRun1_literalMutationNumber138 should have thrown ArrayIndexOutOfBoundsException"); + } catch (ArrayIndexOutOfBoundsException expected) { + Assert.assertEquals("-1", expected.getMessage()); + } + } + + @Test(timeout = 10000) + public void testHelloAppRun2() throws Exception { HelloApp myApp = null; + Assert.assertNull(myApp); File theFile = null; MyStorage fileContent = null; + Assert.assertNull(fileContent); int myCount = 8; String countString = Integer.toString(myCount); + Assert.assertEquals("8", countString); String MyTracesName = "foo3.traces"; - // String message; - + Assert.assertEquals("foo3.traces", MyTracesName); myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); myApp.run(); + theFile = new File(myApp.getMyTracesName()); + boolean o_testHelloAppRun2__17 = theFile.exists(); + Assert.assertTrue(o_testHelloAppRun2__17); + boolean o_testHelloAppRun2__18 = countString.equals(myApp.getMyTraces().getData(0)); + Assert.assertTrue(o_testHelloAppRun2__18); + fileContent = new MyStorage(myApp.getMyTracesName()); + Assert.assertEquals(0, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (fileContent)).getFileName()); + fileContent.readData(); + boolean o_testHelloAppRun2__25 = fileContent.isEqual(myApp.getMyTraces()); + Assert.assertTrue(o_testHelloAppRun2__25); + boolean o_testHelloAppRun2__27 = countString.equals(fileContent.getData(0)); + Assert.assertTrue(o_testHelloAppRun2__27); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertEquals("8", countString); + Assert.assertEquals("foo3.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(8, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertTrue(o_testHelloAppRun2__17); + Assert.assertTrue(o_testHelloAppRun2__18); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertTrue(o_testHelloAppRun2__25); + } - // message = "#### TracesName = " + myApp.getMyTracesName(); - // System.out.println(message); - + @Test(timeout = 10000) + public void testHelloAppRun2_literalMutationNumber152() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + MyStorage fileContent = null; + Assert.assertNull(fileContent); + int myCount = 4; + String countString = Integer.toString(myCount); + Assert.assertEquals("4", countString); + String MyTracesName = "foo3.traces"; + Assert.assertEquals("foo3.traces", MyTracesName); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(4, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.run(); theFile = new File(myApp.getMyTracesName()); - assertEquals(true, theFile.exists()); - assertEquals(true, countString.equals(myApp.getMyTraces().getData(0))); + boolean o_testHelloAppRun2_literalMutationNumber152__18 = theFile.exists(); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber152__18); + boolean o_testHelloAppRun2_literalMutationNumber152__19 = countString.equals(myApp.getMyTraces().getData(0)); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber152__19); + fileContent = new MyStorage(myApp.getMyTracesName()); + Assert.assertEquals(0, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (fileContent)).getFileName()); + fileContent.readData(); + boolean o_testHelloAppRun2_literalMutationNumber152__26 = fileContent.isEqual(myApp.getMyTraces()); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber152__26); + boolean o_testHelloAppRun2_literalMutationNumber152__28 = countString.equals(fileContent.getData(0)); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber152__28); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(4, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertEquals("4", countString); + Assert.assertEquals("foo3.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(4, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber152__18); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber152__19); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber152__26); + } + @Test(timeout = 10000) + public void testHelloAppRun2_literalMutationNumber154() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + MyStorage fileContent = null; + Assert.assertNull(fileContent); + int myCount = 0; + String countString = Integer.toString(myCount); + Assert.assertEquals("0", countString); + String MyTracesName = "foo3.traces"; + Assert.assertEquals("foo3.traces", MyTracesName); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.run(); + theFile = new File(myApp.getMyTracesName()); + boolean o_testHelloAppRun2_literalMutationNumber154__18 = theFile.exists(); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber154__18); + boolean o_testHelloAppRun2_literalMutationNumber154__19 = countString.equals(myApp.getMyTraces().getData(0)); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber154__19); fileContent = new MyStorage(myApp.getMyTracesName()); + Assert.assertEquals(0, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (fileContent)).getFileName()); fileContent.readData(); - assertEquals(true, fileContent.isEqual(myApp.getMyTraces())); - assertEquals(true, countString.equals(fileContent.getData(0))); + boolean o_testHelloAppRun2_literalMutationNumber154__26 = fileContent.isEqual(myApp.getMyTraces()); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber154__26); + boolean o_testHelloAppRun2_literalMutationNumber154__28 = countString.equals(fileContent.getData(0)); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber154__28); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertEquals("0", countString); + Assert.assertEquals("foo3.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("foo3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber154__18); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber154__19); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("foo3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertTrue(o_testHelloAppRun2_literalMutationNumber154__26); + } + + @Test(timeout = 10000) + public void testHelloAppRun2_literalMutationString159_failAssert1() throws Exception { + try { + HelloApp myApp = null; + File theFile = null; + MyStorage fileContent = null; + int myCount = 8; + String countString = Integer.toString(myCount); + String MyTracesName = ""; + myApp = new HelloApp(myCount, MyTracesName); + myApp.run(); + theFile = new File(myApp.getMyTracesName()); + theFile.exists(); + countString.equals(myApp.getMyTraces().getData(0)); + fileContent = new MyStorage(myApp.getMyTracesName()); + fileContent.readData(); + fileContent.isEqual(myApp.getMyTraces()); + countString.equals(fileContent.getData(0)); + org.junit.Assert.fail("testHelloAppRun2_literalMutationString159 should have thrown IndexOutOfBoundsException"); + } catch (IndexOutOfBoundsException expected) { + Assert.assertEquals("Index: 0, Size: 0", expected.getMessage()); + } + } + + @Test(timeout = 10000) + public void testHelloAppRun2_literalMutationNumber164_failAssert2() throws Exception { + try { + HelloApp myApp = null; + File theFile = null; + MyStorage fileContent = null; + int myCount = 8; + String countString = Integer.toString(myCount); + String MyTracesName = "foo3.traces"; + myApp = new HelloApp(myCount, MyTracesName); + myApp.run(); + theFile = new File(myApp.getMyTracesName()); + theFile.exists(); + countString.equals(myApp.getMyTraces().getData(-1)); + fileContent = new MyStorage(myApp.getMyTracesName()); + fileContent.readData(); + fileContent.isEqual(myApp.getMyTraces()); + countString.equals(fileContent.getData(0)); + org.junit.Assert.fail("testHelloAppRun2_literalMutationNumber164 should have thrown ArrayIndexOutOfBoundsException"); + } catch (ArrayIndexOutOfBoundsException expected) { + Assert.assertEquals("-1", expected.getMessage()); + } + } + + @Test(timeout = 10000) + public void testHelloAppRun2_literalMutationNumber168_failAssert3() throws Exception { + try { + HelloApp myApp = null; + File theFile = null; + MyStorage fileContent = null; + int myCount = 8; + String countString = Integer.toString(myCount); + String MyTracesName = "foo3.traces"; + myApp = new HelloApp(myCount, MyTracesName); + myApp.run(); + theFile = new File(myApp.getMyTracesName()); + theFile.exists(); + countString.equals(myApp.getMyTraces().getData(0)); + fileContent = new MyStorage(myApp.getMyTracesName()); + fileContent.readData(); + fileContent.isEqual(myApp.getMyTraces()); + countString.equals(fileContent.getData(-1)); + org.junit.Assert.fail("testHelloAppRun2_literalMutationNumber168 should have thrown ArrayIndexOutOfBoundsException"); + } catch (ArrayIndexOutOfBoundsException expected) { + Assert.assertEquals("-1", expected.getMessage()); + } } - @Test - public void testHelloAppRun3() throws Exception - { + @Test(timeout = 10000) + public void testHelloAppRun3() throws Exception { HelloApp myApp = null; + Assert.assertNull(myApp); File theFile = null; MyStorage fileContent = null; + Assert.assertNull(fileContent); int myCount = 22; String countString = Integer.toString(myCount); + Assert.assertEquals("22", countString); String helloString = "---------------------- Hello World !"; + Assert.assertEquals("---------------------- Hello World !", helloString); String MyTracesName = "hello_run3.traces"; - // String message; - + Assert.assertEquals("hello_run3.traces", MyTracesName); myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); myApp.run(); + fileContent = new MyStorage(myApp.getMyTracesName()); + Assert.assertEquals(0, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (fileContent)).getFileName()); + fileContent.readData(); + boolean o_testHelloAppRun3__19 = fileContent.isEqual(myApp.getMyTraces()); + Assert.assertTrue(o_testHelloAppRun3__19); + boolean o_testHelloAppRun3__21 = countString.equals(fileContent.getData(0)); + Assert.assertTrue(o_testHelloAppRun3__21); + boolean o_testHelloAppRun3__23 = helloString.equals(fileContent.getData(2)); + Assert.assertTrue(o_testHelloAppRun3__23); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertEquals("22", countString); + Assert.assertEquals("---------------------- Hello World !", helloString); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertTrue(o_testHelloAppRun3__19); + Assert.assertTrue(o_testHelloAppRun3__21); + } - // message = "#### TracesName = " + myApp.getMyTracesName(); - // System.out.println(message); + @Test(timeout = 10000) + public void testHelloAppRun3_literalMutationNumber225() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + MyStorage fileContent = null; + Assert.assertNull(fileContent); + int myCount = 0; + String countString = Integer.toString(myCount); + Assert.assertEquals("0", countString); + String helloString = "---------------------- Hello World !"; + Assert.assertEquals("---------------------- Hello World !", helloString); + String MyTracesName = "hello_run3.traces"; + Assert.assertEquals("hello_run3.traces", MyTracesName); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.run(); + fileContent = new MyStorage(myApp.getMyTracesName()); + Assert.assertEquals(0, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (fileContent)).getFileName()); + fileContent.readData(); + boolean o_testHelloAppRun3_literalMutationNumber225__20 = fileContent.isEqual(myApp.getMyTraces()); + Assert.assertTrue(o_testHelloAppRun3_literalMutationNumber225__20); + boolean o_testHelloAppRun3_literalMutationNumber225__22 = countString.equals(fileContent.getData(0)); + Assert.assertTrue(o_testHelloAppRun3_literalMutationNumber225__22); + boolean o_testHelloAppRun3_literalMutationNumber225__24 = helloString.equals(fileContent.getData(2)); + Assert.assertFalse(o_testHelloAppRun3_literalMutationNumber225__24); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertEquals("0", countString); + Assert.assertEquals("---------------------- Hello World !", helloString); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertTrue(o_testHelloAppRun3_literalMutationNumber225__20); + Assert.assertTrue(o_testHelloAppRun3_literalMutationNumber225__22); + } + @Test(timeout = 10000) + public void testHelloAppRun3_literalMutationNumber226() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + File theFile = null; + MyStorage fileContent = null; + Assert.assertNull(fileContent); + int myCount = 21; + String countString = Integer.toString(myCount); + Assert.assertEquals("21", countString); + String helloString = "---------------------- Hello World !"; + Assert.assertEquals("---------------------- Hello World !", helloString); + String MyTracesName = "hello_run3.traces"; + Assert.assertEquals("hello_run3.traces", MyTracesName); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(21, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + myApp.run(); fileContent = new MyStorage(myApp.getMyTracesName()); + Assert.assertEquals(0, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (fileContent)).getFileName()); fileContent.readData(); - assertEquals(true, fileContent.isEqual(myApp.getMyTraces())); - assertEquals(true, countString.equals(fileContent.getData(0))); - assertEquals(true, helloString.equals(fileContent.getData(2))); + boolean o_testHelloAppRun3_literalMutationNumber226__20 = fileContent.isEqual(myApp.getMyTraces()); + Assert.assertTrue(o_testHelloAppRun3_literalMutationNumber226__20); + boolean o_testHelloAppRun3_literalMutationNumber226__22 = countString.equals(fileContent.getData(0)); + Assert.assertTrue(o_testHelloAppRun3_literalMutationNumber226__22); + boolean o_testHelloAppRun3_literalMutationNumber226__24 = helloString.equals(fileContent.getData(2)); + Assert.assertFalse(o_testHelloAppRun3_literalMutationNumber226__24); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(21, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertEquals("21", countString); + Assert.assertEquals("---------------------- Hello World !", helloString); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(21, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertEquals(4, ((int) (((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (((HelloApp) (myApp)).getMyTraces())).getFileName()); + Assert.assertEquals(4, ((int) (((MyStorage) (fileContent)).getDataSize()))); + Assert.assertEquals("hello_run3.traces", ((MyStorage) (fileContent)).getFileName()); + Assert.assertTrue(o_testHelloAppRun3_literalMutationNumber226__20); + Assert.assertTrue(o_testHelloAppRun3_literalMutationNumber226__22); + } + + @Test(timeout = 10000) + public void testHelloAppRun3_literalMutationString236_failAssert4() throws Exception { + try { + HelloApp myApp = null; + File theFile = null; + MyStorage fileContent = null; + int myCount = 22; + String countString = Integer.toString(myCount); + String helloString = "---------------------- Hello World !"; + String MyTracesName = ""; + myApp = new HelloApp(myCount, MyTracesName); + myApp.run(); + fileContent = new MyStorage(myApp.getMyTracesName()); + fileContent.readData(); + fileContent.isEqual(myApp.getMyTraces()); + countString.equals(fileContent.getData(0)); + helloString.equals(fileContent.getData(2)); + org.junit.Assert.fail("testHelloAppRun3_literalMutationString236 should have thrown IndexOutOfBoundsException"); + } catch (IndexOutOfBoundsException expected) { + Assert.assertEquals("Index: 0, Size: 0", expected.getMessage()); + } } - - @Test + + @Test(timeout = 10000) + public void testHelloAppRun3_literalMutationNumber243_failAssert5() throws Exception { + try { + HelloApp myApp = null; + File theFile = null; + MyStorage fileContent = null; + int myCount = 22; + String countString = Integer.toString(myCount); + String helloString = "---------------------- Hello World !"; + String MyTracesName = "hello_run3.traces"; + myApp = new HelloApp(myCount, MyTracesName); + myApp.run(); + fileContent = new MyStorage(myApp.getMyTracesName()); + fileContent.readData(); + fileContent.isEqual(myApp.getMyTraces()); + countString.equals(fileContent.getData(-1)); + helloString.equals(fileContent.getData(2)); + org.junit.Assert.fail("testHelloAppRun3_literalMutationNumber243 should have thrown ArrayIndexOutOfBoundsException"); + } catch (ArrayIndexOutOfBoundsException expected) { + Assert.assertEquals("-1", expected.getMessage()); + } + } + + @Test(timeout = 10000) + public void testHelloAppRun3_literalMutationNumber247_failAssert6() throws Exception { + try { + HelloApp myApp = null; + File theFile = null; + MyStorage fileContent = null; + int myCount = 22; + String countString = Integer.toString(myCount); + String helloString = "---------------------- Hello World !"; + String MyTracesName = "hello_run3.traces"; + myApp = new HelloApp(myCount, MyTracesName); + myApp.run(); + fileContent = new MyStorage(myApp.getMyTracesName()); + fileContent.readData(); + fileContent.isEqual(myApp.getMyTraces()); + countString.equals(fileContent.getData(0)); + helloString.equals(fileContent.getData(4)); + org.junit.Assert.fail("testHelloAppRun3_literalMutationNumber247 should have thrown IndexOutOfBoundsException"); + } catch (IndexOutOfBoundsException expected) { + Assert.assertEquals("Index: 4, Size: 4", expected.getMessage()); + } + } + + @Test(timeout = 10000) public void testHelloAppSomeInfoAreReturned() throws Exception { - HelloApp myApp = null; + HelloApp myApp = null; + Assert.assertNull(myApp); + int myCount = 22; + String MyTracesName = "hello_run3.traces"; + Assert.assertEquals("hello_run3.traces", MyTracesName); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + boolean boolean_1 = (myApp.getMyAppSystemInformation(true)) != null; + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + } + + @Test(timeout = 10000) + public void testHelloAppSomeInfoAreReturned_literalMutationNumber322() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + int myCount = 0; + String MyTracesName = "hello_run3.traces"; + Assert.assertEquals("hello_run3.traces", MyTracesName); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + boolean boolean_2 = (myApp.getMyAppSystemInformation(true)) != null; + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + } + + @Test(timeout = 10000) + public void testHelloAppSomeInfoAreReturned_literalMutationNumber323() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + int myCount = 21; + String MyTracesName = "hello_run3.traces"; + Assert.assertEquals("hello_run3.traces", MyTracesName); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(21, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + boolean boolean_3 = (myApp.getMyAppSystemInformation(true)) != null; + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(21, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(21, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + } + + @Test(timeout = 10000) + public void testHelloAppSomeInfoAreReturned_literalMutationBoolean333() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); int myCount = 22; String MyTracesName = "hello_run3.traces"; - myApp = new HelloApp(myCount, MyTracesName); - - - assertTrue("App should return some info", myApp.getMyAppSystemInformation(true)!= null); + Assert.assertEquals("hello_run3.traces", MyTracesName); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + boolean boolean_13 = (myApp.getMyAppSystemInformation(false)) != null; + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); } - - @Test + + @Test(timeout = 10000) public void testHelloAppDetailedInfoAreReturned() throws Exception { - HelloApp myApp = null; + HelloApp myApp = null; + Assert.assertNull(myApp); int myCount = 22; String MyTracesName = "hello_run3.traces"; - + Assert.assertEquals("hello_run3.traces", MyTracesName); String expectedDetailedInfo = "My App Detailed Infos"; - - myApp = new HelloApp(myCount, MyTracesName); - - - assertEquals("App should return deatailed info", expectedDetailedInfo, myApp.getMyAppSystemInformation(true)); + Assert.assertEquals("My App Detailed Infos", expectedDetailedInfo); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + String o_testHelloAppDetailedInfoAreReturned__7 = myApp.getMyAppSystemInformation(true); + Assert.assertEquals("My App Detailed Infos", o_testHelloAppDetailedInfoAreReturned__7); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertEquals("My App Detailed Infos", expectedDetailedInfo); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + } + + @Test(timeout = 10000) + public void testHelloAppDetailedInfoAreReturned_literalMutationNumber1() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + int myCount = 0; + String MyTracesName = "hello_run3.traces"; + Assert.assertEquals("hello_run3.traces", MyTracesName); + String expectedDetailedInfo = "My App Detailed Infos"; + Assert.assertEquals("My App Detailed Infos", expectedDetailedInfo); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + String o_testHelloAppDetailedInfoAreReturned_literalMutationNumber1__8 = myApp.getMyAppSystemInformation(true); + Assert.assertEquals("My App Detailed Infos", o_testHelloAppDetailedInfoAreReturned_literalMutationNumber1__8); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertEquals("My App Detailed Infos", expectedDetailedInfo); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(0, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + } + + @Test(timeout = 10000) + public void testHelloAppDetailedInfoAreReturned_literalMutationNumber2() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + int myCount = 21; + String MyTracesName = "hello_run3.traces"; + Assert.assertEquals("hello_run3.traces", MyTracesName); + String expectedDetailedInfo = "My App Detailed Infos"; + Assert.assertEquals("My App Detailed Infos", expectedDetailedInfo); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(21, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + String o_testHelloAppDetailedInfoAreReturned_literalMutationNumber2__8 = myApp.getMyAppSystemInformation(true); + Assert.assertEquals("My App Detailed Infos", o_testHelloAppDetailedInfoAreReturned_literalMutationNumber2__8); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(21, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertEquals("My App Detailed Infos", expectedDetailedInfo); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(21, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); } - // ********************************************************************** - // private - // ********************************************************************** - // ******** attributes + @Test(timeout = 10000) + public void testHelloAppDetailedInfoAreReturned_literalMutationBoolean18() throws Exception { + HelloApp myApp = null; + Assert.assertNull(myApp); + int myCount = 22; + String MyTracesName = "hello_run3.traces"; + Assert.assertEquals("hello_run3.traces", MyTracesName); + String expectedDetailedInfo = "My App Detailed Infos"; + Assert.assertEquals("My App Detailed Infos", expectedDetailedInfo); + myApp = new HelloApp(myCount, MyTracesName); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + String o_testHelloAppDetailedInfoAreReturned_literalMutationBoolean18__7 = myApp.getMyAppSystemInformation(false); + Assert.assertEquals("My App General Infos", o_testHelloAppDetailedInfoAreReturned_literalMutationBoolean18__7); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + Assert.assertEquals("hello_run3.traces", MyTracesName); + Assert.assertEquals("My App Detailed Infos", expectedDetailedInfo); + Assert.assertTrue(((HelloApp) (myApp)).getShouldPrintOnStdout()); + Assert.assertEquals(22, ((int) (((HelloApp) (myApp)).getMyPrintCount()))); + Assert.assertEquals("hello_run3.traces", ((HelloApp) (myApp)).getMyTracesName()); + Assert.assertNull(((HelloApp) (myApp)).getMyTraces()); + } } + diff --git a/src/test/java/eu/stamp_project/examples/dhell/MyStorageTest.java b/src/test/java/eu/stamp_project/examples/dhell/MyStorageTest.java index 759a9b9..8172eef 100644 --- a/src/test/java/eu/stamp_project/examples/dhell/MyStorageTest.java +++ b/src/test/java/eu/stamp_project/examples/dhell/MyStorageTest.java @@ -1,118 +1,608 @@ -package eu.stamp_project.examples.dhell; - -import static org.junit.Assert.assertEquals; -import org.junit.Test; -import java.io.File; -import java.util.*; - -import eu.stamp_project.examples.dhell.MyStorage; - -public class MyStorageTest -{ - // ********************************************************************** - // public - // ********************************************************************** - @Test - public void testMyStorageDefault() throws Exception - { - MyStorage myFile = null; - String myFileName = "my_storage.txt"; - File theFile = null; - - MyStorage.deleteFile(myFileName); - - myFile = new MyStorage(); - assertEquals(myFileName, myFile.getFileName()); - assertEquals(0, myFile.getDataSize()); - - theFile = new File(myFileName); - theFile = new File(myFileName); - assertEquals(false, theFile.exists()); - } - - @Test - public void testMyStorageString() throws Exception - { - MyStorage myFile = null; - String myFileName = "foofoo.txt"; - File theFile = null; - - MyStorage.deleteFile(myFileName); - - myFile = new MyStorage(myFileName); - assertEquals(myFileName, myFile.getFileName()); - assertEquals(0, myFile.getDataSize()); - - theFile = new File(myFileName); - assertEquals(false, theFile.exists()); - } - - @Test - public void testAddData() throws Exception - { - MyStorage myFile = null; - String myFileName = "foo.txt"; - ArrayList myData = new ArrayList(); - - // file content - // 1st line - // a second line, longer than the first one - // 3rd line with something else: 2, 4, 8, 16 - myData.add("1st line"); - myData.add("a second line, longer than the first one"); - myData.add("3rd line with something else: 2, 4, 8, 16"); - - myFile = new MyStorage(myFileName); - for (int i = 0; i < myData.size(); i++) - { - myFile.addData(myData.get(i)); - } - - assertEquals(myData.size(), myFile.getDataSize()); - assertEquals(true, myFile.dataAreEqual(myData)); - } - - @Test - public void testSaveReadData() throws Exception - { - MyStorage myFile = null; - MyStorage mySecondFile = null; - String myFileName = "bar.txt"; - File theFile = null; - ArrayList myData = new ArrayList(); - - MyStorage.deleteFile(myFileName); - - // file content - // 1st line - // a second line, longer than the first one - // 3rd line with something else: 2, 4, 8, 16 - myData.add("1st line"); - myData.add("a second line, longer than the first one"); - myData.add("3rd line with something else: 2, 4, 8, 16"); - - // write data in the first file - myFile = new MyStorage(myFileName); - for (int i = 0; i < myData.size(); i++) - { - myFile.addData(myData.get(i)); - } - assertEquals(myData.size(), myFile.getDataSize()); - assertEquals(true, myFile.dataAreEqual(myData)); - - myFile.saveData(); - theFile = new File(myFileName); - assertEquals(true, theFile.exists()); - - // read data in the 2nd file - mySecondFile = new MyStorage(myFileName); - assertEquals(true, theFile.exists()); - - mySecondFile.readData(); - assertEquals(myData.size(), mySecondFile.getDataSize()); - assertEquals(true, mySecondFile.dataAreEqual(myData)); - - // compare content - assertEquals(true, myFile.isEqual(mySecondFile)); - } -} +package eu.stamp_project.examples.dhell; + + +import java.io.File; +import java.util.ArrayList; +import org.junit.Assert; +import org.junit.Test; + + +public class MyStorageTest { + @Test(timeout = 10000) + public void testMyStorageDefault_literalMutationString112() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + String myFileName = ""; + Assert.assertEquals("", myFileName); + File theFile = null; + MyStorage.deleteFile(myFileName); + myFile = new MyStorage(); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("my_storage.txt", ((MyStorage) (myFile)).getFileName()); + myFile.getFileName(); + myFile.getDataSize(); + theFile = new File(myFileName); + theFile = new File(myFileName); + boolean o_testMyStorageDefault_literalMutationString112__13 = theFile.exists(); + Assert.assertFalse(o_testMyStorageDefault_literalMutationString112__13); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("my_storage.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals("", myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("my_storage.txt", ((MyStorage) (myFile)).getFileName()); + } + + @Test(timeout = 10000) + public void testMyStorageDefault_literalMutationString113() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + String myFileName = "eu.stamp_project.examples.dhell.MyGod"; + Assert.assertEquals("eu.stamp_project.examples.dhell.MyGod", myFileName); + File theFile = null; + MyStorage.deleteFile(myFileName); + myFile = new MyStorage(); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("my_storage.txt", ((MyStorage) (myFile)).getFileName()); + myFile.getFileName(); + myFile.getDataSize(); + theFile = new File(myFileName); + theFile = new File(myFileName); + boolean o_testMyStorageDefault_literalMutationString113__13 = theFile.exists(); + Assert.assertFalse(o_testMyStorageDefault_literalMutationString113__13); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("my_storage.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals("eu.stamp_project.examples.dhell.MyGod", myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("my_storage.txt", ((MyStorage) (myFile)).getFileName()); + } + + @Test(timeout = 10000) + public void testMyStorageString_literalMutationString136() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + String myFileName = "fofoo.txt"; + Assert.assertEquals("fofoo.txt", myFileName); + File theFile = null; + MyStorage.deleteFile(myFileName); + myFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("fofoo.txt", ((MyStorage) (myFile)).getFileName()); + myFile.getFileName(); + myFile.getDataSize(); + theFile = new File(myFileName); + boolean o_testMyStorageString_literalMutationString136__11 = theFile.exists(); + Assert.assertFalse(o_testMyStorageString_literalMutationString136__11); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("fofoo.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals("fofoo.txt", myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("fofoo.txt", ((MyStorage) (myFile)).getFileName()); + } + + @Test(timeout = 10000) + public void testMyStorageString_literalMutationString137() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + String myFileName = ""; + Assert.assertEquals("", myFileName); + File theFile = null; + MyStorage.deleteFile(myFileName); + myFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (myFile)).getFileName()); + myFile.getFileName(); + myFile.getDataSize(); + theFile = new File(myFileName); + boolean o_testMyStorageString_literalMutationString137__11 = theFile.exists(); + Assert.assertFalse(o_testMyStorageString_literalMutationString137__11); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals("", myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (myFile)).getFileName()); + } + + @Test(timeout = 10000) + public void testAddData() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + String myFileName = "foo.txt"; + Assert.assertEquals("foo.txt", myFileName); + ArrayList myData = new ArrayList(); + boolean o_testAddData__5 = myData.add("1st line"); + Assert.assertTrue(o_testAddData__5); + boolean o_testAddData__10 = myData.add("a second line, longer than the first one"); + Assert.assertTrue(o_testAddData__10); + boolean o_testAddData__11 = myData.add("3rd line with something else: 2, 4, 8, 16"); + Assert.assertTrue(o_testAddData__11); + myFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("foo.txt", ((MyStorage) (myFile)).getFileName()); + for (int i = 0; i < (myData.size()); i++) { + myFile.addData(myData.get(i)); + } + int o_testAddData__21 = myData.size(); + Assert.assertEquals(3, ((int) (o_testAddData__21))); + myFile.getDataSize(); + boolean o_testAddData__23 = myFile.dataAreEqual(myData); + Assert.assertTrue(o_testAddData__23); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("foo.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals("foo.txt", myFileName); + Assert.assertTrue(o_testAddData__5); + Assert.assertTrue(o_testAddData__10); + Assert.assertTrue(o_testAddData__11); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("foo.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (o_testAddData__21))); + } + + @Test(timeout = 10000) + public void testAddData_literalMutationString1() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + String myFileName = ""; + Assert.assertEquals("", myFileName); + ArrayList myData = new ArrayList(); + boolean o_testAddData_literalMutationString1__5 = myData.add("1st line"); + Assert.assertTrue(o_testAddData_literalMutationString1__5); + boolean o_testAddData_literalMutationString1__10 = myData.add("a second line, longer than the first one"); + Assert.assertTrue(o_testAddData_literalMutationString1__10); + boolean o_testAddData_literalMutationString1__11 = myData.add("3rd line with something else: 2, 4, 8, 16"); + Assert.assertTrue(o_testAddData_literalMutationString1__11); + myFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (myFile)).getFileName()); + for (int i = 0; i < (myData.size()); i++) { + myFile.addData(myData.get(i)); + } + int o_testAddData_literalMutationString1__21 = myData.size(); + Assert.assertEquals(3, ((int) (o_testAddData_literalMutationString1__21))); + myFile.getDataSize(); + boolean o_testAddData_literalMutationString1__23 = myFile.dataAreEqual(myData); + Assert.assertTrue(o_testAddData_literalMutationString1__23); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals("", myFileName); + Assert.assertTrue(o_testAddData_literalMutationString1__5); + Assert.assertTrue(o_testAddData_literalMutationString1__10); + Assert.assertTrue(o_testAddData_literalMutationString1__11); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (o_testAddData_literalMutationString1__21))); + } + + @Test(timeout = 10000) + public void testAddData_literalMutationNumber25() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + String myFileName = "foo.txt"; + Assert.assertEquals("foo.txt", myFileName); + ArrayList myData = new ArrayList(); + boolean o_testAddData_literalMutationNumber25__5 = myData.add("1st line"); + Assert.assertTrue(o_testAddData_literalMutationNumber25__5); + boolean o_testAddData_literalMutationNumber25__10 = myData.add("a second line, longer than the first one"); + Assert.assertTrue(o_testAddData_literalMutationNumber25__10); + boolean o_testAddData_literalMutationNumber25__11 = myData.add("3rd line with something else: 2, 4, 8, 16"); + Assert.assertTrue(o_testAddData_literalMutationNumber25__11); + myFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("foo.txt", ((MyStorage) (myFile)).getFileName()); + for (int i = 1; i < (myData.size()); i++) { + myFile.addData(myData.get(i)); + } + int o_testAddData_literalMutationNumber25__22 = myData.size(); + Assert.assertEquals(3, ((int) (o_testAddData_literalMutationNumber25__22))); + myFile.getDataSize(); + boolean o_testAddData_literalMutationNumber25__24 = myFile.dataAreEqual(myData); + Assert.assertFalse(o_testAddData_literalMutationNumber25__24); + Assert.assertEquals(2, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("foo.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals("foo.txt", myFileName); + Assert.assertTrue(o_testAddData_literalMutationNumber25__5); + Assert.assertTrue(o_testAddData_literalMutationNumber25__10); + Assert.assertTrue(o_testAddData_literalMutationNumber25__11); + Assert.assertEquals(2, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("foo.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (o_testAddData_literalMutationNumber25__22))); + } + + @Test(timeout = 10000) + public void testAddData_literalMutationNumber26_failAssert0() throws Exception { + try { + MyStorage myFile = null; + String myFileName = "foo.txt"; + ArrayList myData = new ArrayList(); + myData.add("1st line"); + myData.add("a second line, longer than the first one"); + myData.add("3rd line with something else: 2, 4, 8, 16"); + myFile = new MyStorage(myFileName); + for (int i = -1; i < (myData.size()); i++) { + myFile.addData(myData.get(i)); + } + myData.size(); + myFile.getDataSize(); + myFile.dataAreEqual(myData); + org.junit.Assert.fail("testAddData_literalMutationNumber26 should have thrown ArrayIndexOutOfBoundsException"); + } catch (ArrayIndexOutOfBoundsException expected) { + Assert.assertEquals("-1", expected.getMessage()); + } + } + + @Test(timeout = 10000) + public void testSaveReadData() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + MyStorage mySecondFile = null; + Assert.assertNull(mySecondFile); + String myFileName = "bar.txt"; + Assert.assertEquals("bar.txt", myFileName); + File theFile = null; + ArrayList myData = new ArrayList(); + MyStorage.deleteFile(myFileName); + boolean o_testSaveReadData__8 = myData.add("1st line"); + Assert.assertTrue(o_testSaveReadData__8); + boolean o_testSaveReadData__13 = myData.add("a second line, longer than the first one"); + Assert.assertTrue(o_testSaveReadData__13); + boolean o_testSaveReadData__14 = myData.add("3rd line with something else: 2, 4, 8, 16"); + Assert.assertTrue(o_testSaveReadData__14); + myFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (myFile)).getFileName()); + for (int i = 0; i < (myData.size()); i++) { + myFile.addData(myData.get(i)); + } + int o_testSaveReadData__25 = myData.size(); + Assert.assertEquals(3, ((int) (o_testSaveReadData__25))); + myFile.getDataSize(); + boolean o_testSaveReadData__27 = myFile.dataAreEqual(myData); + Assert.assertTrue(o_testSaveReadData__27); + myFile.saveData(); + theFile = new File(myFileName); + boolean o_testSaveReadData__31 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData__31); + mySecondFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (mySecondFile)).getFileName()); + boolean o_testSaveReadData__35 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData__35); + boolean o_testSaveReadData__36 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData__36); + mySecondFile.readData(); + int o_testSaveReadData__38 = myData.size(); + Assert.assertEquals(3, ((int) (o_testSaveReadData__38))); + mySecondFile.getDataSize(); + boolean o_testSaveReadData__40 = mySecondFile.dataAreEqual(myData); + Assert.assertTrue(o_testSaveReadData__40); + boolean o_testSaveReadData__41 = myFile.isEqual(mySecondFile); + Assert.assertTrue(o_testSaveReadData__41); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (mySecondFile)).getFileName()); + Assert.assertEquals("bar.txt", myFileName); + Assert.assertTrue(o_testSaveReadData__8); + Assert.assertTrue(o_testSaveReadData__13); + Assert.assertTrue(o_testSaveReadData__14); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (o_testSaveReadData__25))); + Assert.assertTrue(o_testSaveReadData__27); + Assert.assertTrue(o_testSaveReadData__31); + Assert.assertEquals(3, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (mySecondFile)).getFileName()); + Assert.assertTrue(o_testSaveReadData__35); + Assert.assertTrue(o_testSaveReadData__36); + Assert.assertEquals(3, ((int) (o_testSaveReadData__38))); + Assert.assertTrue(o_testSaveReadData__40); + } + + @Test(timeout = 10000) + public void testSaveReadData_literalMutationString160() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + MyStorage mySecondFile = null; + Assert.assertNull(mySecondFile); + String myFileName = ""; + Assert.assertEquals("", myFileName); + File theFile = null; + ArrayList myData = new ArrayList(); + MyStorage.deleteFile(myFileName); + boolean o_testSaveReadData_literalMutationString160__8 = myData.add("1st line"); + Assert.assertTrue(o_testSaveReadData_literalMutationString160__8); + boolean o_testSaveReadData_literalMutationString160__13 = myData.add("a second line, longer than the first one"); + Assert.assertTrue(o_testSaveReadData_literalMutationString160__13); + boolean o_testSaveReadData_literalMutationString160__14 = myData.add("3rd line with something else: 2, 4, 8, 16"); + Assert.assertTrue(o_testSaveReadData_literalMutationString160__14); + myFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (myFile)).getFileName()); + for (int i = 0; i < (myData.size()); i++) { + myFile.addData(myData.get(i)); + } + int o_testSaveReadData_literalMutationString160__25 = myData.size(); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString160__25))); + myFile.getDataSize(); + boolean o_testSaveReadData_literalMutationString160__27 = myFile.dataAreEqual(myData); + Assert.assertTrue(o_testSaveReadData_literalMutationString160__27); + myFile.saveData(); + theFile = new File(myFileName); + boolean o_testSaveReadData_literalMutationString160__31 = theFile.exists(); + Assert.assertFalse(o_testSaveReadData_literalMutationString160__31); + mySecondFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (mySecondFile)).getFileName()); + boolean o_testSaveReadData_literalMutationString160__35 = theFile.exists(); + Assert.assertFalse(o_testSaveReadData_literalMutationString160__35); + boolean o_testSaveReadData_literalMutationString160__36 = theFile.exists(); + Assert.assertFalse(o_testSaveReadData_literalMutationString160__36); + mySecondFile.readData(); + int o_testSaveReadData_literalMutationString160__38 = myData.size(); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString160__38))); + mySecondFile.getDataSize(); + boolean o_testSaveReadData_literalMutationString160__40 = mySecondFile.dataAreEqual(myData); + Assert.assertFalse(o_testSaveReadData_literalMutationString160__40); + boolean o_testSaveReadData_literalMutationString160__41 = myFile.isEqual(mySecondFile); + Assert.assertFalse(o_testSaveReadData_literalMutationString160__41); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(0, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (mySecondFile)).getFileName()); + Assert.assertEquals("", myFileName); + Assert.assertTrue(o_testSaveReadData_literalMutationString160__8); + Assert.assertTrue(o_testSaveReadData_literalMutationString160__13); + Assert.assertTrue(o_testSaveReadData_literalMutationString160__14); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString160__25))); + Assert.assertTrue(o_testSaveReadData_literalMutationString160__27); + Assert.assertFalse(o_testSaveReadData_literalMutationString160__31); + Assert.assertEquals(0, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("", ((MyStorage) (mySecondFile)).getFileName()); + Assert.assertFalse(o_testSaveReadData_literalMutationString160__35); + Assert.assertFalse(o_testSaveReadData_literalMutationString160__36); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString160__38))); + Assert.assertFalse(o_testSaveReadData_literalMutationString160__40); + } + + @Test(timeout = 10000) + public void testSaveReadData_literalMutationString161() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + MyStorage mySecondFile = null; + Assert.assertNull(mySecondFile); + String myFileName = "eu.stamp_project.examples.dhell.MyGod"; + Assert.assertEquals("eu.stamp_project.examples.dhell.MyGod", myFileName); + File theFile = null; + ArrayList myData = new ArrayList(); + MyStorage.deleteFile(myFileName); + boolean o_testSaveReadData_literalMutationString161__8 = myData.add("1st line"); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__8); + boolean o_testSaveReadData_literalMutationString161__13 = myData.add("a second line, longer than the first one"); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__13); + boolean o_testSaveReadData_literalMutationString161__14 = myData.add("3rd line with something else: 2, 4, 8, 16"); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__14); + myFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("eu.stamp_project.examples.dhell.MyGod", ((MyStorage) (myFile)).getFileName()); + for (int i = 0; i < (myData.size()); i++) { + myFile.addData(myData.get(i)); + } + int o_testSaveReadData_literalMutationString161__25 = myData.size(); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString161__25))); + myFile.getDataSize(); + boolean o_testSaveReadData_literalMutationString161__27 = myFile.dataAreEqual(myData); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__27); + myFile.saveData(); + theFile = new File(myFileName); + boolean o_testSaveReadData_literalMutationString161__31 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__31); + mySecondFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("eu.stamp_project.examples.dhell.MyGod", ((MyStorage) (mySecondFile)).getFileName()); + boolean o_testSaveReadData_literalMutationString161__35 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__35); + boolean o_testSaveReadData_literalMutationString161__36 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__36); + mySecondFile.readData(); + int o_testSaveReadData_literalMutationString161__38 = myData.size(); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString161__38))); + mySecondFile.getDataSize(); + boolean o_testSaveReadData_literalMutationString161__40 = mySecondFile.dataAreEqual(myData); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__40); + boolean o_testSaveReadData_literalMutationString161__41 = myFile.isEqual(mySecondFile); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__41); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("eu.stamp_project.examples.dhell.MyGod", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("eu.stamp_project.examples.dhell.MyGod", ((MyStorage) (mySecondFile)).getFileName()); + Assert.assertEquals("eu.stamp_project.examples.dhell.MyGod", myFileName); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__8); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__13); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__14); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("eu.stamp_project.examples.dhell.MyGod", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString161__25))); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__27); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__31); + Assert.assertEquals(3, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("eu.stamp_project.examples.dhell.MyGod", ((MyStorage) (mySecondFile)).getFileName()); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__35); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__36); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString161__38))); + Assert.assertTrue(o_testSaveReadData_literalMutationString161__40); + } + + @Test(timeout = 10000) + public void testSaveReadData_literalMutationString166() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + MyStorage mySecondFile = null; + Assert.assertNull(mySecondFile); + String myFileName = "bar.txt"; + Assert.assertEquals("bar.txt", myFileName); + File theFile = null; + ArrayList myData = new ArrayList(); + MyStorage.deleteFile(myFileName); + boolean o_testSaveReadData_literalMutationString166__8 = myData.add(""); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__8); + boolean o_testSaveReadData_literalMutationString166__13 = myData.add("a second line, longer than the first one"); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__13); + boolean o_testSaveReadData_literalMutationString166__14 = myData.add("3rd line with something else: 2, 4, 8, 16"); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__14); + myFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (myFile)).getFileName()); + for (int i = 0; i < (myData.size()); i++) { + myFile.addData(myData.get(i)); + } + int o_testSaveReadData_literalMutationString166__25 = myData.size(); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString166__25))); + myFile.getDataSize(); + boolean o_testSaveReadData_literalMutationString166__27 = myFile.dataAreEqual(myData); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__27); + myFile.saveData(); + theFile = new File(myFileName); + boolean o_testSaveReadData_literalMutationString166__31 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__31); + mySecondFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (mySecondFile)).getFileName()); + boolean o_testSaveReadData_literalMutationString166__35 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__35); + boolean o_testSaveReadData_literalMutationString166__36 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__36); + mySecondFile.readData(); + int o_testSaveReadData_literalMutationString166__38 = myData.size(); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString166__38))); + mySecondFile.getDataSize(); + boolean o_testSaveReadData_literalMutationString166__40 = mySecondFile.dataAreEqual(myData); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__40); + boolean o_testSaveReadData_literalMutationString166__41 = myFile.isEqual(mySecondFile); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__41); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (mySecondFile)).getFileName()); + Assert.assertEquals("bar.txt", myFileName); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__8); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__13); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__14); + Assert.assertEquals(3, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString166__25))); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__27); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__31); + Assert.assertEquals(3, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (mySecondFile)).getFileName()); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__35); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__36); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationString166__38))); + Assert.assertTrue(o_testSaveReadData_literalMutationString166__40); + } + + @Test(timeout = 10000) + public void testSaveReadData_literalMutationNumber184() throws Exception { + MyStorage myFile = null; + Assert.assertNull(myFile); + MyStorage mySecondFile = null; + Assert.assertNull(mySecondFile); + String myFileName = "bar.txt"; + Assert.assertEquals("bar.txt", myFileName); + File theFile = null; + ArrayList myData = new ArrayList(); + MyStorage.deleteFile(myFileName); + boolean o_testSaveReadData_literalMutationNumber184__8 = myData.add("1st line"); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__8); + boolean o_testSaveReadData_literalMutationNumber184__13 = myData.add("a second line, longer than the first one"); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__13); + boolean o_testSaveReadData_literalMutationNumber184__14 = myData.add("3rd line with something else: 2, 4, 8, 16"); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__14); + myFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (myFile)).getFileName()); + for (int i = 1; i < (myData.size()); i++) { + myFile.addData(myData.get(i)); + } + int o_testSaveReadData_literalMutationNumber184__26 = myData.size(); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationNumber184__26))); + myFile.getDataSize(); + boolean o_testSaveReadData_literalMutationNumber184__28 = myFile.dataAreEqual(myData); + Assert.assertFalse(o_testSaveReadData_literalMutationNumber184__28); + myFile.saveData(); + theFile = new File(myFileName); + boolean o_testSaveReadData_literalMutationNumber184__32 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__32); + mySecondFile = new MyStorage(myFileName); + Assert.assertEquals(0, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (mySecondFile)).getFileName()); + boolean o_testSaveReadData_literalMutationNumber184__36 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__36); + boolean o_testSaveReadData_literalMutationNumber184__37 = theFile.exists(); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__37); + mySecondFile.readData(); + int o_testSaveReadData_literalMutationNumber184__39 = myData.size(); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationNumber184__39))); + mySecondFile.getDataSize(); + boolean o_testSaveReadData_literalMutationNumber184__41 = mySecondFile.dataAreEqual(myData); + Assert.assertFalse(o_testSaveReadData_literalMutationNumber184__41); + boolean o_testSaveReadData_literalMutationNumber184__42 = myFile.isEqual(mySecondFile); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__42); + Assert.assertEquals(2, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(2, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (mySecondFile)).getFileName()); + Assert.assertEquals("bar.txt", myFileName); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__8); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__13); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__14); + Assert.assertEquals(2, ((int) (((MyStorage) (myFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (myFile)).getFileName()); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationNumber184__26))); + Assert.assertFalse(o_testSaveReadData_literalMutationNumber184__28); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__32); + Assert.assertEquals(2, ((int) (((MyStorage) (mySecondFile)).getDataSize()))); + Assert.assertEquals("bar.txt", ((MyStorage) (mySecondFile)).getFileName()); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__36); + Assert.assertTrue(o_testSaveReadData_literalMutationNumber184__37); + Assert.assertEquals(3, ((int) (o_testSaveReadData_literalMutationNumber184__39))); + Assert.assertFalse(o_testSaveReadData_literalMutationNumber184__41); + } + + @Test(timeout = 10000) + public void testSaveReadData_literalMutationNumber185_failAssert1() throws Exception { + try { + MyStorage myFile = null; + MyStorage mySecondFile = null; + String myFileName = "bar.txt"; + File theFile = null; + ArrayList myData = new ArrayList(); + MyStorage.deleteFile(myFileName); + myData.add("1st line"); + myData.add("a second line, longer than the first one"); + myData.add("3rd line with something else: 2, 4, 8, 16"); + myFile = new MyStorage(myFileName); + for (int i = -1; i < (myData.size()); i++) { + myFile.addData(myData.get(i)); + } + myData.size(); + myFile.getDataSize(); + myFile.dataAreEqual(myData); + myFile.saveData(); + theFile = new File(myFileName); + theFile.exists(); + mySecondFile = new MyStorage(myFileName); + theFile.exists(); + theFile.exists(); + mySecondFile.readData(); + myData.size(); + mySecondFile.getDataSize(); + mySecondFile.dataAreEqual(myData); + myFile.isEqual(mySecondFile); + org.junit.Assert.fail("testSaveReadData_literalMutationNumber185 should have thrown ArrayIndexOutOfBoundsException"); + } catch (ArrayIndexOutOfBoundsException expected) { + Assert.assertEquals("-1", expected.getMessage()); + } + } +} +