public ImageManipulator(Bitmap bitmap, ImageManipulatorType.Name filter, ThreadHandler thHandler, int[] values = null )
 {
     this.bitmap = bitmap;
     this.filter = filter;
     this.thHandler = thHandler;
     this.values = values;
 }
 public void getInstanceTest()
 {
     int threads = 2; // TODO: Passenden Wert initialisieren
     ThreadHandler target = new ThreadHandler(threads);
     ThreadHandler actual = ThreadHandler.getInstance();
     Assert.AreEqual(actual, target);
 }
 public ThreadHandler( int threads)
 {
     this.threads = threads;
     alive = new ArrayList(threads);
     this.startTime();
     _object = this;
 }
        public void getTimeTest()
        {
            int threads = 0; // TODO: Passenden Wert initialisieren
            ThreadHandler target = new ThreadHandler(threads); // TODO: Passenden Wert initialisieren

            long actual;
            actual = target.getTime();
            Assert.IsNotNull( actual > -1);
        }
 public void getThreadsTest()
 {
     int threads = 2; // TODO: Passenden Wert initialisieren
     ThreadHandler target = new ThreadHandler(threads); // TODO: Passenden Wert initialisieren
     int expected = 2; // TODO: Passenden Wert initialisieren
     int actual;
     actual = target.getThreads();
     Assert.AreEqual(expected, actual);
 }
 /// <summary>
 /// Constructor for ThreadHandlerEventArgs.
 /// </summary>
 /// <param name="threadHandler">ThreadHandler object</param>
 public ThreadHandlerEventArgs(ThreadHandler threadHandler)
 {
     ThreadHandler = threadHandler;
 }
 public ImageManipulater(Bitmap b, ImageManipulaterType.Name filter, ThreadHandler thHandler)
 {
     this.b = b;
     this.filter = filter;
     this.thHandler = thHandler;
 }
 public void invoke_refreshTest()
 {
     int threads = 0; // TODO: Passenden Wert initialisieren
     ThreadHandler target = new ThreadHandler(threads); // TODO: Passenden Wert initialisieren
     PictureBox pic = null; // TODO: Passenden Wert initialisieren
     target.refresh(pic);
 }
 public void try_save_PixelStateTest()
 {
     ThreadHandler t = new ThreadHandler(2);
     PrivateObject param0 = new PrivateObject(t);
     ThreadHandler_Accessor target = new ThreadHandler_Accessor(param0); // TODO: Passenden Wert initialisieren
     Bitmap b = new Bitmap(10, 10);
     Image img = (Image)b;
     ImageManipulatorType.Name manipulator = ImageManipulatorType.Name.RGB_RED; // TODO: Passenden Wert initialisieren
     ImageObject imgO = new ImageObject(img, manipulator);
     target.try_save_PixelState(imgO);
     PixelState state = PixelState.getInstance();
     Assert.IsInstanceOfType(state.get_last(), typeof(ImageObject));
     Assert.IsNotNull(state.get_last());
 }
 public void threadsAreAliveTest()
 {
     int threads = 0; // TODO: Passenden Wert initialisieren
     ThreadHandler target = new ThreadHandler(threads); // TODO: Passenden Wert initialisieren
     bool expected = false; // TODO: Passenden Wert initialisieren
     bool actual;
     actual = target.threadsAreAlive();
     Assert.AreEqual(expected, actual);
 }
        public void ThreadHandlerConstructorTest()
        {
            int threads = 2; // TODO: Passenden Wert initialisieren
            ThreadHandler target = new ThreadHandler(threads);

            Assert.AreEqual(target.getThreads(), threads);
        }
 public void save_PixelStateTest()
 {
     int threads = 0; // TODO: Passenden Wert initialisieren
     ThreadHandler target = new ThreadHandler(threads); // TODO: Passenden Wert initialisieren
     Bitmap b = new Bitmap(10, 10);
     Image img = (Image)b;
     ImageManipulatorType.Name manipulator = ImageManipulatorType.Name.RGB_RED; // TODO: Passenden Wert initialisieren
     ImageObject imgO = new ImageObject(img, manipulator);
     target.save_PixelState(imgO);
     PixelState state = PixelState.getInstance();
     Assert.IsInstanceOfType(state, typeof(PixelState));
 }
        public void registerTest()
        {
            PixelState p = PixelState.getInstance();

            int threads = 0; // TODO: Passenden Wert initialisieren
            ThreadHandler target = new ThreadHandler(threads); // TODO: Passenden Wert initialisieren
            Thread thread = new Thread(p.reset); // TODO: Passenden Wert initialisieren
            target.register(thread);

            Assert.IsFalse(target.threadsAreAlive());
        }
 /// <summary>
 /// Constructor for ThreadHandlerExceptionArgs.
 /// </summary>
 /// <param name="threadHandler">ThreadHandler object</param>
 /// <param name="exception">Exception object</param>
 public ThreadHandlerExceptionArgs(ThreadHandler threadHandler, Exception exception)
 {
     ThreadHandler = threadHandler;
     Exception = exception;
 }