jody / hellocs3250 Goto Github PK
View Code? Open in Web Editor NEWHello World project for CS3250
License: Other
Hello World project for CS3250
License: Other
sayHello method cannot accept a null and thus when ran with jUnit the sayHelloNullTest method fails to run.
There are checkstyle errors on the HelloAnyontest.java file.
Errors:
Unused import - org.junit.jupiter.api.Test.
Comment matches to-do format 'TODO:'.
The checkstyle report describes an error that the file HelloWorld.java does not end with a newline.
Test sayHelloNullTest expects "Hello!" but produces "Hello null"
Needed to fully complete issue #34
Acceptance Criteria:
• Tests within the unit test class (HelloAnyoneTest) exercise the functionality of the subclass
HelloAnyone.java has trailing spaces on line 34.
Link: https://github.com/jody/helloCS3250/blob/master/src/metrocs/HelloAnyone.java
HelloWorld.java file does not end with a newline.
Link: https://github.com/jody/helloCS3250/blob/master/src/metrocs/HelloWorld.java
Note: Checkstyle errors also exist in the file HelloAnyoneTest.java because this file is unfinished and should be expected until completed.
Checkstyle reports error "Parameter toWhom should be final." for HelloWorld.java line 24
As a maintainer,
I want the basic tests for the sayHello method in HelloWorld to be more robust,
so that I can have greater confidence when I use them for regression testing after I make updates to the code.
The existing tests for sayHello are limited, each uses only exactly length 5 strings of lower case letters from the first 128 characters of UTF-8.
It would be beneficial to have tests that check more cases, such as very long strings and strings with characters outside of the 26 lower-case letters.
References:
https://en.wikipedia.org/wiki/UTF-8
Acceptance Criteria
Build fails when running test because testresults folder is not created in build.xml:
BUILD FAILED
/helloCS3250/build.xml:119: /helloCS3250/reports/testresults does not exist.
Line 34 has trailing spaces.
As an instructor, I want a subclass of HelloWorld that can be used to demonstrate inheritance and overriding.
Acceptance Criteria:
√ A subclass of HelloWorld exists
√ The subclass demonstrates calling an inherited method [partial; could use enhancement]
√ The subclass demonstrates overriding an inherited method
√ There is a unit test class for the subclass
x Tests within the unit test class exercise the functionality of the subclass [see: Issue #36]
Checkstyle reports error "Unused import - org.junit.jupiter.api.Assertions.assertTrue." for HelloWorldTest.java line 5
Line has trailing spaces on line 34
Objective:
Refactor the sayHello method to facilitate future changes that would allow for strings other than "Hello".
Background:
The sayHello method uses three string literals, each of which has prefix "Hello": "Hello!", "Hello", and "Hello ".
Suggested Approach:
Refactor so that a single common stem is used, modified as necessary to reflect the parameter value.
References:
https://www.refactoring.com
Objective:
Refactor the HelloWorld.java and HelloAnyone.java to facilitate future changes that would allow for strings other than "world" to be passed to the toWhom argument of the sayHello method.
Background:
The current call to the sayHello method uses a hard-coded string. A variable would allow for different strings to be passed to the method without changing the individual function calls. This would improve continuity in the code. See issue #30
Suggested Approach:
Refactor so that a single common stem is used, modified as necessary to reflect the parameter value.
References:
https://www.refactoring.com
Unnecessary is misleading unless truly is 'unnecessary', we suggest renaming to checkIfNull or checkNotNull!
-The unnecessaryTest on line 35 is redundant since the object is never null, create a more complex test to fully ensure code is working properly.
-Getting run problems such as, "Cannot resolve symbol" etc.
Test sayHelloEmptyStringTest expects "Hello" but produces "Hello ".
Test sayHelloNullTest expects "Hello!" but produces "Hello null"
As a perspective contributor,
I want to learn the following from the README
so that I can efficiently get started contributing to the project.
Acceptance Criteria:
Test groupedAssertionTest() expected: "Hello" but was "Hello "
expected: "Hello!" but was: "Hello null"
When using the "ant test" command to run unit tests, the following error is produced:
C:\Users\train\Documents\Computer Science\helloCS\helloCS3250\build.xml:119:
C:\Users\train\Documents\Computer Science\helloCS\helloCS3250\reports\testresults does not exist.
As a workaround, you can create the folder yourself in the terminal or with file explorer, and it will "run" and output results to the directory.
While running the program if the version of java is 14 or higher, the program won't run. A window with the legend "Java: error: release version 14 not supported" so for this project will be necessary to run a lower version of Java.
checkstyle report shows trailing space error on line 34 on HelloAnyone.java
Here is the link for the file:
https://github.com/jody/helloCS3250/blob/master/src/metrocs/HelloAnyone.java
Please add information about the file or files affected in the title. It is also helpful to link to put a link the line of the affected file using GitHub markdown.
Bug Description: When trying to run the ant test test from the main project it will fail to build. specifically stating that the "/home/dev/cs3250/helloCS3250/build.xml:119 /home/dev/cs3250/helloCS3250/reports/testresults does not exist." So the xml file is not creating the directory to store the test results report.
To Reproduce: To repeat this error follow the instruction in the project readme. More specifically type in "ant test" in the terminal after copying and compiling the project.
Expected behavior: A test report should be generated as an html file and placed in the reports directory.
System info:
OS: Ubuntu V21.01
Browser: Mozilla
Version: helloCS3250 current main version.
Additional Context: This appears to be an issue with the XML no creating the reports directory when the project is run. The XML file should be creating the the reports directory with the other directories when the project is cleaned and rebuilt.
In HelloWorldTest.java, there is a failed test: sayHelloEmptyStringTest() ✘ expected: <Hello>
but was: <Hello >
HelloAnyone.java has unfinished TODO
Link: https://github.com/jody/helloCS3250/blob/master/src/metrocs/HelloAnyoneTest.java
• Write functionality test for main method within the unit test class (HelloAnyoneTest) for HelloAnyone.java line 15-16.
I'm getting a checkstyle error for trailing space in HelloAnyone.java line #34.
A JUnit test fails because there is not a null parameter version of the method.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.