Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish ContentItemTest #620

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@

package com.rometools.modules.content;

import junit.framework.TestCase;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.rometools.modules.content.ContentItem;
import junit.framework.TestCase;

/**
* This is all standard property storage testing.
Expand Down Expand Up @@ -136,20 +134,20 @@ public void testContentResource() {
* @todo make better Test of ContentResource method, of class
* com.totsp.xml.syndication.content.ContentItem.
*/
public void testEquals() {
LOG.debug("testEquals");
final String test = "http://www.w3.org/2000/svg";
public void testEquals() {

assertTrue(test.equals(test));
final ContentItem test2 = ContentModuleImplTest.contentItems.get(0);
assertTrue(!test.equals(test2));
final ContentItem test3 = new ContentItem();
test3.setContentFormat(new String("http://www.w3.org/1999/xhtml"));
test3.setContentEncoding(new String("http://www.w3.org/TR/REC-xml#dt-wellformed"));
test3.setContentEncoding(new String("Literal"));
// test3.setContentValueNamespace(new String("http://www.w3.org/1999/xhtml"));
test3.setContentValue(new String("<em>This is <strong>very</strong></em> <strong>cool</strong>."));
// assertEquals( test2, test3 );
}
LOG.debug("testEquals");

final ContentItem item1 = ContentModuleImplTest.contentItems.get(0);

final ContentItem item2 = new ContentItem();
item2.setContentFormat(new String("http://www.w3.org/1999/xhtml"));
item2.setContentEncoding(new String("http://www.w3.org/TR/REC-xml#dt-wellformed"));
item2.setContentValue(new String("<em>This is <strong>very</strong></em> <strong>cool</strong>."));
item2.setContentValueParseType(new String("Literal"));

assertEquals(item1, item2);

}

}