summaryrefslogtreecommitdiffstats
path: root/proxy/src/test
diff options
context:
space:
mode:
authorAdrian Likins <adrian@alikins.usersys.redhat.com>2010-01-12 14:55:51 -0500
committerAdrian Likins <adrian@alikins.usersys.redhat.com>2010-01-12 14:55:51 -0500
commit3efdc75ab04a5d5f1d547ea23fdc8459c368130c (patch)
tree635678ab41c8d99235d3754a1996b112a7c9d1cd /proxy/src/test
parent939fee56c640dda3caffe718133ffdbd84370700 (diff)
downloadcandlepin-attr.tar.gz
candlepin-attr.tar.xz
candlepin-attr.zip
Add hibernate annotations for Attribute classattr
add Attribute test cases modify EntitlementPool and Product to use Attribute class
Diffstat (limited to 'proxy/src/test')
-rw-r--r--proxy/src/test/java/org/fedoraproject/candlepin/model/test/AttributeTest.java58
1 files changed, 58 insertions, 0 deletions
diff --git a/proxy/src/test/java/org/fedoraproject/candlepin/model/test/AttributeTest.java b/proxy/src/test/java/org/fedoraproject/candlepin/model/test/AttributeTest.java
new file mode 100644
index 0000000..800de8e
--- /dev/null
+++ b/proxy/src/test/java/org/fedoraproject/candlepin/model/test/AttributeTest.java
@@ -0,0 +1,58 @@
+package org.fedoraproject.candlepin.model.test;
+
+import org.fedoraproject.candlepin.test.DatabaseTestFixture;
+
+import org.fedoraproject.candlepin.model.Attribute;
+
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+public class AttributeTest extends DatabaseTestFixture {
+
+
+ @Before
+ public void setupTestObjects() {
+ String some_attribute = "canEatCheese";
+ }
+
+ @Test
+ public void testCreateAttr() {
+ Attribute newAttr = new Attribute();
+
+ }
+
+ @Test
+ public void testAttributeSetName() {
+ Attribute newAttr = new Attribute();
+ newAttr.setName("OwesUsMoney");
+ }
+
+
+ @Test
+ public void testAttributeGetName() {
+ Attribute newAttr = new Attribute();
+ String some_name = "OwesUsMoney";
+
+ newAttr.setName(some_name);
+ assertEquals(some_name, newAttr.getName());
+ }
+
+ @Test
+ public void testAttributeSetQuantity() {
+ Attribute newAttr = new Attribute();
+ Long some_number = new Long(100);
+ newAttr.setQuantity(some_number);
+ }
+
+
+ @Test
+ public void testAttributeGetQuantity() {
+ Attribute newAttr = new Attribute();
+ Long some_number = new Long(200);
+
+ newAttr.setQuantity(some_number);
+ assertEquals(some_number, newAttr.getQuantity());
+ }
+
+} \ No newline at end of file