Skip to content

Commit

Permalink
change assert to assertEquals
Browse files Browse the repository at this point in the history
Signed-off-by: Maxwell Brown <[email protected]>
  • Loading branch information
Galactus22625 committed Oct 23, 2024
1 parent 387889d commit 7adc196
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import java.util.Map;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;

Expand Down Expand Up @@ -58,26 +59,26 @@ public void testStringSettersAndGetters(){
String expand = "expandTest";

issueBean.setExpand(expand);
assert(issueBean.getExpand().equals(expand));;
assertEquals(issueBean.getExpand(), expand);;
issueBean.setId(id);
assert(issueBean.getId().equals(id));
assertEquals(issueBean.getId(), id);
issueBean.setSelf(self);
assert(issueBean.getSelf().equals(self));
assertEquals(issueBean.getSelf(), self);
issueBean.setKey(key);
assert(issueBean.getKey().equals(key));
assertEquals(issueBean.getKey(), key);
}

@Test
public void testMapSettersAndGetters(){

issueBean.setRenderedFields(renderedFieldsTestObject);
assert(issueBean.getRenderedFields().equals(renderedFieldsTestObject));
assertEquals(issueBean.getRenderedFields(), renderedFieldsTestObject);
issueBean.setProperties(propertiesTestObject);
assert(issueBean.getProperties().equals(propertiesTestObject));
assertEquals(issueBean.getProperties(), propertiesTestObject);
issueBean.setNames(namesTestObject);
assert(issueBean.getNames().equals(namesTestObject));
assertEquals(issueBean.getNames(), namesTestObject);
issueBean.setFields(fieldsTestObject);
assert(issueBean.getFields().equals(fieldsTestObject));
assertEquals(issueBean.getFields(), fieldsTestObject);
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package org.opensearch.dataprepper.plugins.source.saas.jira.models;

import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.junit.jupiter.MockitoExtension;

@ExtendWith(MockitoExtension.class)
public class IssueItemTest {
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ public void testGetters() throws JsonProcessingException {

jsonTypeBean = objectMapper.readValue(jsonString, JsonTypeBean.class);

assert(jsonTypeBean.getType().equals(type));
assert(jsonTypeBean.getItems().equals(items));
assert(jsonTypeBean.getSystem().equals(system));
assert(jsonTypeBean.getCustom().equals(custom));
assert(jsonTypeBean.getCustomId().equals(customId));
assert(jsonTypeBean.getConfiguration().equals(testConfiguration));
assertEquals(jsonTypeBean.getType(), type);
assertEquals(jsonTypeBean.getItems(), items);
assertEquals(jsonTypeBean.getSystem(), system);
assertEquals(jsonTypeBean.getCustom(), custom);
assertEquals(jsonTypeBean.getCustomId(), customId);
assertEquals(jsonTypeBean.getConfiguration(), testConfiguration);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ public void testGetters() throws JsonProcessingException {

searchResults = objectMapper.readValue(jsonString, SearchResults.class);

assert(searchResults.getExpand().equals(expand));
assert(searchResults.getStartAt().equals(startAt));
assert(searchResults.getMaxResults().equals(maxResults));
assert(searchResults.getTotal().equals(total));
assert(searchResults.getWarningMessages().equals(testWarnings));
assert(searchResults.getNames().equals(names));
assert(searchResults.getSchema().equals(schema));
assertEquals(searchResults.getExpand(), expand);
assertEquals(searchResults.getStartAt(), startAt);
assertEquals(searchResults.getMaxResults(), maxResults);
assertEquals(searchResults.getTotal(), total);
assertEquals(searchResults.getWarningMessages(), testWarnings);
assertEquals(searchResults.getNames(), names);
assertEquals(searchResults.getSchema(), schema);


List<IssueBean> returnedIssues = searchResults.getIssues();
Expand Down

0 comments on commit 7adc196

Please sign in to comment.