/** Tests the isBuilding method of the class {@link BuildMemory}. With a forgotten build. */ @Test public void testIsBuildingFalseWhenForgotten() { PatchsetCreated event = Setup.createPatchsetCreated(); BuildMemory instance = new BuildMemory(); AbstractProject project = mock(AbstractProject.class); AbstractBuild build = mock(AbstractBuild.class); when(build.getProject()).thenReturn(project); instance.started(event, build); instance.forget(event); assertFalse(instance.isBuilding(event)); }
/** test. */ @Test public void testForget() { System.out.println("forget"); PatchsetCreated event = Setup.createPatchsetCreated(); AbstractProject project = mock(AbstractProject.class); AbstractBuild build = mock(AbstractBuild.class); when(build.getProject()).thenReturn(project); BuildMemory instance = new BuildMemory(); instance.completed(event, build); instance.forget(event); assertNull(instance.getMemoryImprint(event)); }