當前位置: 首頁>>代碼示例>>Java>>正文


Java ECReportOutputSpec類代碼示例

本文整理匯總了Java中org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec的典型用法代碼示例。如果您正苦於以下問題:Java ECReportOutputSpec類的具體用法?Java ECReportOutputSpec怎麽用?Java ECReportOutputSpec使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ECReportOutputSpec類屬於org.fosstrak.ale.xsd.ale.epcglobal包,在下文中一共展示了ECReportOutputSpec類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testEqualWithTags

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * test equal reports.
 * @throws Exception test failure.
 */
@Test
public void testEqualWithTags() throws Exception {
	ECReports reportTwoTags = getECReports(ECREPORTS_NULLGROUP_TWOTAGS);
	
	ECReportOutputSpec outputSpec = EasyMock.createMock(ECReportOutputSpec.class);
	EasyMock.expect(outputSpec.isIncludeEPC()).andReturn(true);
	EasyMock.expect(outputSpec.isIncludeTag()).andReturn(true);
	EasyMock.expect(outputSpec.isIncludeRawHex()).andReturn(true);
	EasyMock.replay(outputSpec);
	
	ECReportSpec spec = EasyMock.createMock(ECReportSpec.class);
	EasyMock.expect(spec.getOutput()).andReturn(outputSpec).atLeastOnce();
	EasyMock.replay(spec);
	
	ECReportsHelper helper = new ECReportsHelper();
	
	Assert.assertTrue(invokeHelper(helper, reportTwoTags, reportTwoTags, spec));
	
	EasyMock.verify(spec);
	EasyMock.verify(outputSpec);
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:26,代碼來源:ECReportsHelperTest.java

示例2: testEqualWithoutTags

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * test equal reports.
 * @throws Exception test failure.
 */
@Test
public void testEqualWithoutTags() throws Exception {
	ECReports reportNoTags = getECReports(ECREPORTS_NULLGROUP_NOTAGSINGROUP);
	
	ECReportOutputSpec outputSpec = EasyMock.createMock(ECReportOutputSpec.class);
	EasyMock.expect(outputSpec.isIncludeEPC()).andReturn(true);
	EasyMock.expect(outputSpec.isIncludeTag()).andReturn(true);
	EasyMock.expect(outputSpec.isIncludeRawHex()).andReturn(true);
	EasyMock.replay(outputSpec);
	
	ECReportSpec spec = EasyMock.createMock(ECReportSpec.class);
	EasyMock.expect(spec.getOutput()).andReturn(outputSpec).atLeastOnce();
	EasyMock.replay(spec);
	
	ECReportsHelper helper = new ECReportsHelper();
	
	Assert.assertTrue(invokeHelper(helper, reportNoTags, reportNoTags, spec));
	
	EasyMock.verify(spec);
	EasyMock.verify(outputSpec);
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:26,代碼來源:ECReportsHelperTest.java

示例3: testNotEqualNotTheSameMembersFirstMore

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * test equal reports - not the same members.
 * @throws Exception test failure.
 */
@Test
public void testNotEqualNotTheSameMembersFirstMore() throws Exception {
	ECReports reportTwoTags = getECReports(ECREPORTS_NULLGROUP_TWOTAGS);
	ECReports reportOneTag = getECReports(ECREPORTS_NULLGROUP_ONETAG);
			
	ECReportOutputSpec outputSpec = EasyMock.createMock(ECReportOutputSpec.class);
	EasyMock.expect(outputSpec.isIncludeEPC()).andReturn(true);
	EasyMock.expect(outputSpec.isIncludeTag()).andReturn(true);
	EasyMock.expect(outputSpec.isIncludeRawHex()).andReturn(true);
	EasyMock.replay(outputSpec);
	
	ECReportSpec spec = EasyMock.createMock(ECReportSpec.class);
	EasyMock.expect(spec.getOutput()).andReturn(outputSpec).atLeastOnce();
	EasyMock.replay(spec);
	
	ECReportsHelper helper = new ECReportsHelper();
	
	Assert.assertFalse(invokeHelper(helper, reportTwoTags, reportOneTag, spec));
	EasyMock.verify(spec);
	EasyMock.verify(outputSpec);
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:26,代碼來源:ECReportsHelperTest.java

示例4: testNotEqualNotTheSameMembersSecondMore

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * test equal reports - not the same members.
 * @throws Exception test failure.
 */
@Test
public void testNotEqualNotTheSameMembersSecondMore() throws Exception {
	ECReports reportTwoTags = getECReports(ECREPORTS_NULLGROUP_TWOTAGS);
	ECReports reportOneTag = getECReports(ECREPORTS_NULLGROUP_ONETAG);
			
	ECReportOutputSpec outputSpec = EasyMock.createMock(ECReportOutputSpec.class);
	EasyMock.expect(outputSpec.isIncludeEPC()).andReturn(true);
	EasyMock.expect(outputSpec.isIncludeTag()).andReturn(true);
	EasyMock.expect(outputSpec.isIncludeRawHex()).andReturn(true);
	EasyMock.replay(outputSpec);
	
	ECReportSpec spec = EasyMock.createMock(ECReportSpec.class);
	EasyMock.expect(spec.getOutput()).andReturn(outputSpec).atLeastOnce();
	EasyMock.replay(spec);
	
	ECReportsHelper helper = new ECReportsHelper();
	
	Assert.assertFalse(invokeHelper(helper, reportOneTag, reportTwoTags, spec));
	EasyMock.verify(spec);
	EasyMock.verify(outputSpec);
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:26,代碼來源:ECReportsHelperTest.java

示例5: testCheckReportSpecs

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * test the report spec validation.
 * @throws ECSpecValidationException violation against the specification.
 */
@Test
public void testCheckReportSpecs() throws ECSpecValidationException {
	ECSpec.ReportSpecs reportSpecs = new ECSpec.ReportSpecs();
	
	ECReportSpec spec1 = new ECReportSpec();
	spec1.setReportName("spec1");
	ECReportSpec spec2 = new ECReportSpec();
	spec2.setReportName("spec2");
			
	ECReportOutputSpec outputSpec1 = new ECReportOutputSpec();
	outputSpec1.setIncludeCount(true);
	spec1.setOutput(outputSpec1);

	ECReportOutputSpec outputSpec2 = new ECReportOutputSpec();
	outputSpec2.setIncludeEPC(true);
	spec2.setOutput(outputSpec2);
	
	reportSpecs.getReportSpec().add(spec1);
	reportSpecs.getReportSpec().add(spec2);
	Assert.assertTrue(validator.checkReportSpecs(reportSpecs));
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:26,代碼來源:ECSpecValidatorTest.java

示例6: assertEquals

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
public static void assertEquals(ECReportOutputSpec expected, ECReportOutputSpec actual) {
	
	if (expected == null || actual == null) {
		if (expected == null && actual == null) {
			return;
		} else {
			throw new AssertionFailedError();
		}
	}
	assertEquals(expected.isIncludeCount(), actual.isIncludeCount());
	assertEquals(expected.isIncludeEPC(), actual.isIncludeEPC());
	assertEquals(expected.isIncludeRawDecimal(), actual.isIncludeRawDecimal());
	assertEquals(expected.isIncludeRawHex(), actual.isIncludeRawHex());
	assertEquals(expected.isIncludeTag(), actual.isIncludeTag());
	assertEquals(expected.getAny(), actual.getAny());
	assertEquals(expected.getExtension(), actual.getExtension());
	
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:19,代碼來源:ECElementsUtils.java

示例7: testCheckReportSpecs

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * test the report spec validation.
 * @throws ECSpecValidationException violation against the specification.
 */
//@Test
public void testCheckReportSpecs() throws ECSpecValidationException {
	ECSpec.ReportSpecs reportSpecs = new ECSpec.ReportSpecs();
	
	ECReportSpec spec1 = new ECReportSpec();
	spec1.setReportName("spec1");
	ECReportSpec spec2 = new ECReportSpec();
	spec2.setReportName("spec2");
			
	ECReportOutputSpec outputSpec1 = new ECReportOutputSpec();
	outputSpec1.setIncludeCount(true);
	spec1.setOutput(outputSpec1);

	ECReportOutputSpec outputSpec2 = new ECReportOutputSpec();
	outputSpec2.setIncludeEPC(true);
	spec2.setOutput(outputSpec2);
	
	reportSpecs.getReportSpec().add(spec1);
	reportSpecs.getReportSpec().add(spec2);
	Assert.assertTrue(validator.checkReportSpecs(reportSpecs));
}
 
開發者ID:gs1oliot,項目名稱:oliot-fc,代碼行數:26,代碼來源:ECSpecValidatorTest.java

示例8: checkReportOutputSpec

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * verify the report output specification.
 * @param outputSpec the output specification.
 * @return true if the specification is OK, otherwise throws exception.
 * @throws ECSpecValidationException violates the specification.
 */
public boolean checkReportOutputSpec(String reportName, ECReportOutputSpec outputSpec) throws ECSpecValidationException {
	if (null == outputSpec) {
		throw logAndCreateECSpecValidationException("there is no output spec for report spec: " + reportName);
	}
	if (!outputSpec.isIncludeEPC() && !outputSpec.isIncludeTag() && !outputSpec.isIncludeRawHex() && !outputSpec.isIncludeRawDecimal() && !outputSpec.isIncludeCount()) {
		throw logAndCreateECSpecValidationException("The ECReportOutputSpec of ReportSpec '" + reportName + "' has no output type specified.");
	}
	return true;
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:16,代碼來源:ECSpecValidator.java

示例9: isReportOutputSpecIncludeRawDecimal

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * determine if a tag is to be included into the output in the format raw decimal.
 * @param outputSpec the report output specification.
 * @return true if include, false otherwise. upon exception, false is returned.
 */
public static boolean isReportOutputSpecIncludeRawDecimal(ECReportOutputSpec outputSpec) {
	try {
		return outputSpec.isIncludeRawDecimal();
	} catch (Exception ex) {
		LOG.debug("exception while determining if tag is to be included as raw decimal, thus not including the tag: ", ex);
	}
	return false;
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:14,代碼來源:TagHelper.java

示例10: isReportOutputSpecIncludeTagEncoding

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * determine if a tag is to be included into the output in the format tag encoding.
 * @param outputSpec the report output specification.
 * @return true if include, false otherwise. upon exception, false is returned.
 */
public static boolean isReportOutputSpecIncludeTagEncoding(ECReportOutputSpec outputSpec) {
	try {
		return outputSpec.isIncludeTag();
	} catch (Exception ex) {
		LOG.debug("exception while determining if tag is to be included as tag encoding, thus not including the tag: ", ex);
	}
	return false;
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:14,代碼來源:TagHelper.java

示例11: isReportOutputSpecIncludeRawHex

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * determine if a tag is to be included into the output in the format raw hex.
 * @param outputSpec the report output specification.
 * @return true if include, false otherwise. upon exception, false is returned.
 */
public static boolean isReportOutputSpecIncludeRawHex(ECReportOutputSpec outputSpec) {
	try {
		return outputSpec.isIncludeRawHex();
	} catch (Exception ex) {
		LOG.debug("exception while determining if tag is to be included as raw hex, thus not including the tag: ", ex);
	}
	return false;
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:14,代碼來源:TagHelper.java

示例12: isReportOutputSpecIncludeEPC

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * determine if a tag is to be included into the output in the format EPC.
 * @param outputSpec the report output specification.
 * @return true if include, false otherwise. upon exception, false is returned.
 */
public static boolean isReportOutputSpecIncludeEPC(ECReportOutputSpec outputSpec) {
	try {
		return outputSpec.isIncludeEPC();
	} catch (Exception ex) {
		LOG.debug("exception while determining if tag is to be included as EPC, thus not including the tag: ", ex);
	}
	return false;
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:14,代碼來源:TagHelper.java

示例13: testReportOutputSpecNoOutputFormatGiven

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * test the report output spec validation - must throw exception here as no output definition is given.
 * @throws ECSpecValidationException violation against the specification.
 */
@Test(expected = ECSpecValidationException.class)
public void testReportOutputSpecNoOutputFormatGiven() throws ECSpecValidationException {
	final String reportName = "reportName";
	final ECReportOutputSpec outputSpec = new ECReportOutputSpec();
	validator.checkReportOutputSpec(reportName, outputSpec);
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:11,代碼來源:ECSpecValidatorTest.java

示例14: testIsReportOutputSpecIncludeRawDecimalExceptionReturnsFalse

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * test if to add the tag in raw decimal - exception case.
 */
@Test
public void testIsReportOutputSpecIncludeRawDecimalExceptionReturnsFalse() {
	ECReportOutputSpec outputSpec = EasyMock.createMock(ECReportOutputSpec.class);
	EasyMock.expect(outputSpec.isIncludeRawDecimal()).andThrow(new IllegalArgumentException("MOCK EXCEPTION FOR TEST"));
	EasyMock.replay(outputSpec);
	
	Assert.assertFalse(TagHelper.isReportOutputSpecIncludeRawDecimal(outputSpec));
	EasyMock.verify(outputSpec);
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:13,代碼來源:TagHelperTest.java

示例15: testIsReportOutputSpecIncludeRawDecimal

import org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec; //導入依賴的package包/類
/**
 * test if to add the tag in raw decimal - normal cases.
 */
@Test
public void testIsReportOutputSpecIncludeRawDecimal() {
	ECReportOutputSpec outputSpec = EasyMock.createMock(ECReportOutputSpec.class);
	EasyMock.expect(outputSpec.isIncludeRawDecimal()).andReturn(false);
	EasyMock.replay(outputSpec);
	ECReportOutputSpec outputSpec2 = EasyMock.createMock(ECReportOutputSpec.class);
	EasyMock.expect(outputSpec2.isIncludeRawDecimal()).andReturn(true);
	EasyMock.replay(outputSpec2);
	
	Assert.assertFalse(TagHelper.isReportOutputSpecIncludeRawDecimal(outputSpec));
	Assert.assertTrue(TagHelper.isReportOutputSpecIncludeRawDecimal(outputSpec2));
	EasyMock.verify(outputSpec);
	EasyMock.verify(outputSpec2);
}
 
開發者ID:Auto-ID-Lab-Japan,項目名稱:fosstrak-fc,代碼行數:18,代碼來源:TagHelperTest.java


注:本文中的org.fosstrak.ale.xsd.ale.epcglobal.ECReportOutputSpec類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。