Question
Add JUnit tests for the methods in the Attachment and Ticket classes. Then zip up the whole project and submit it through this assignment drop
Add JUnit tests for the methods in the Attachment and Ticket classes. Then zip up the whole project and submit it through this assignment drop box. Please note this is in the language of Java. The bottom two pieces of code are the attachment and ticket classes.
Here is the AWS XML File:
Compiler XML:
Jar Repositories XML:
misc XML:
customer support ticket file:
POM.XML:
.gitattributes:
# Auto detect text files and perform LF normalization * text=auto
.gitignore:
# Default ignored files /shelf/ /workspace.xml # Datasource local storage ignored files /../../../../../../../:\Users\jamccune\Documents\INFO 1541 Java III\CustomerSupportTicket\.idea/dataSources/ /dataSources.local.xml # Editor-based HTTP Client requests /httpRequests/
Here is the attachment class:
public class Attachment { private String name;
private byte[] contents;
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public byte[] getContents() { return contents; }
public void setContents(byte[] contents) { this.contents = contents; } }
Here is the Ticket class:
import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map;
public class Ticket { private String customerName;
private String subject;
private String body;
private Map
public String getCustomerName() { return customerName; }
public void setCustomerName(String customerName) { this.customerName = customerName; }
public String getSubject() { return subject; }
public void setSubject(String subject) { this.subject = subject; }
public String getBody() { return body; }
public void setBody(String body) { this.body = body; }
public Attachment getAttachment(String name) { return this.attachments.get(name); }
public Collection
public void addAttachment(Attachment attachment) { this.attachments.put(attachment.getName(), attachment); }
public int getNumberOfAttachments() { return this.attachments.size(); } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started