Home » Blog

TestNG SingleLinkedList Class

TestNG SingleLinkedList Class Source for testing SingleLinkedList with TestNG framework. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package sdz.ds.lists; import static org.testng.Assert.*; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** * * @author larry */ public class SingleLinkedListNGTest { SingleLinkedList testList1 = new SingleLinkedList(); public SingleLinkedListNGTest() { } @BeforeClass public static void setUpClass() throws Exception { } @AfterClass public static void tearDownClass() ...

DS02 SingleLinkedList TestNG

Testing SingleLinkedList with TestNG Framework This post is a continuation of the prev post   DS01 SingleLinkedList and Iterator TestNG Unit Testing NG stands for Next Generation. So I guess JUnit is like Star Trek Original Series and TestNG is like Star Trek Next Generation! From what I have seen thus far, it’s pretty darn good though. So the two failed test I was getting were, NullPointerExceptions and failed assertions. I only used assertTrue() assertFalse() assertNull() assertNotNull() and assertEquals(). There are plenty more types to use in the test suite. I do not believe that I can be a purist in test first methodology.  I discovered something in testing these classes. Don’t write a lot of code and then a lot of test. I feel that you should write a little code, then a l...

DS01 SingleLinkedList and Iterator

SingleLinkedList, Iterator and Unit Test This is the first article in a data structures tutorial series. We start with a linked list that is a singly linked list. This means it has nodes with only forward pointing pointers. This linked list is also an Iterator which is a design pattern. My version of this iterator has a reset() method to set the position pointer back to the first node in the list. Also this list does not give you access to the nodes themselves, only the element E that the node contains. The list can be made of any type of element E. As an example of unit testing I supply you with the TestNG code. If you are using Apache NetBeans 11 you may use TestNG for unit testing. Currently I could not get JUnit to work in NetBeans. Java API LinkedList class Interfaces and Classes Seve...

An overview of CSS 3 Part 1

What is CSS? CSS separates structural and semantic content from formatting or presentation. HTML is the structure, CSS is the presentation and JavaScript is the behavior. The presentation is the size, position, color, font etc. It’s the layout and looks. Rules make up style text. Rules can be placed within an HTML tag itself with “style” attribute, within HTML<style> tag, or better yet within style files that you link to your document. A rule is made up of a “selector” and a set of properties. More CSS, HTML and HTML5 articles CSS Intro | HTML Intro | HTML 5  | CSS Tutorial Site Of course the selector selects which parts of the page to alter in appearance. The rules are simply name:value pairs. And selectors can be simple or complex by using combinators....

HTML5 Overview

HTML5 Overview and Introduction HTML5 is comprised of tags. Tags are names(elements) inside of < and > (angle brackets). There are two basic types of tags. Structural and Semantic. Structural tags define what is on a web page. Semantic tags define purpose or meaning for some items on a web page and make good hooks for CSS Style rules. Either way they both define structure and not presentation. Presentation is left up to CSS3 or Cascading Style Sheets. And behavior is left up to JavaScript.  Though with CSS you can achieve some effects that resemble behavior. The behavior is part of the browser, not CSS or JavaScript. This article is not about CSS or JavaScript. Tags (Elements) Tags define elements. Some tags need open and closing tags and wrap text and other elements. Other tags...

Simple 3D Graphics using JavaFX

Simple3D Graphics JavaFX rewrite of my first article using Swing Simple 3D graphics using Java was my first article using Swing UI. As you know JavaFX is the replacement for Swing. In this article I will talk about JavaFX a bit more than the app itself because it was a conversion. This is not only a JavaFX app it’s a JavaFX FXML app. So like Android apps there are two ways to define the UI. You can build it with code within class  definitions and constructors. Or you can define the UI with XML. In this case its FXML for Java FX XML. SceneBuilder and NetBeans You can define the FXML with a text/code editor. This would be painful and you would have to know FXML fairly well and do a lot of looking things up. Or you can download SceneBuilder from Gluon. You can use the FXML generated by ...

SDZ Video 3 – Git, Sourceforge and Eclipse

 Show you how to do Git pull Edit Something add commit push Demonstrate how to use sourceforge git repo, and eclipse with command line Git


Over 70 Articles– Most for Newbies– Some with sourcecode– File IO Tutorial– 2 Database Articles    


10 meaty Podcast– Not a lot of jabber– I’m learning be patient– Audio Quality is not superb yet– They will be better in time– Java Language– 2D and 3D game coding  


3 Videos with more to come– Demonstrations– Task Examples– Or maybe anything    


Persistant Storage— File IO — Database — Intro to Data Structures    


Register–Hang out–Message members–Forums–Discussion Groups–Get a buddy to hang out here with you and join me. Voice and Text based chat rooms.  

  • 1
  • 2
  • 6