public void testStageUrethra() { EodStagingData data = new EodStagingData.EodStagingInputBuilder() .withInput(EodInput.PRIMARY_SITE, "C250") .withInput(EodInput.HISTOLOGY, "8154") .withInput(EodInput.DX_YEAR, "2018") .withInput(EodInput.TUMOR_SIZE_SUMMARY, "004") .withInput(EodInput.NODES_POS, "03") .withInput(EodInput.EOD_PRIMARY_TUMOR, "500") .withInput(EodInput.EOD_REGIONAL_NODES, "300") .withInput(EodInput.EOD_METS, "10").build(); // perform the staging _STAGING.stage(data); Assert.AreEqual(StagingData.Result.STAGED, data.getResult()); Assert.AreEqual("pancreas", data.getSchemaId()); Assert.AreEqual(0, data.getErrors().Count); Assert.AreEqual(12, data.getPath().Count); Assert.AreEqual(8, data.getOutput().Count); // check outputs Assert.AreEqual(EodVersion.LATEST.getVersion(), data.getOutput(EodOutput.DERIVED_VERSION)); Assert.AreEqual("7", data.getOutput(EodOutput.SS_2018_DERIVED)); Assert.AreEqual("00280", data.getOutput(EodOutput.NAACCR_SCHEMA_ID)); Assert.AreEqual("4", data.getOutput(EodOutput.EOD_2018_STAGE_GROUP)); Assert.AreEqual("T1", data.getOutput(EodOutput.EOD_2018_T)); Assert.AreEqual("N1", data.getOutput(EodOutput.EOD_2018_N)); Assert.AreEqual("M1", data.getOutput(EodOutput.EOD_2018_M)); Assert.AreEqual("28", data.getOutput(EodOutput.AJCC_ID)); }
public void testContentNotReturnedForInvalidYear() { EodStagingData data = new EodStagingData.EodStagingInputBuilder() .withInput(EodInput.PRIMARY_SITE, "C713") .withInput(EodInput.HISTOLOGY, "8020") .withInput(EodInput.BEHAVIOR, "3") .withInput(EodInput.DX_YEAR, "2010") .withInput(EodInput.EOD_PRIMARY_TUMOR, "200") .withInput(EodInput.EOD_REGIONAL_NODES, "300") .withInput(EodInput.EOD_METS, "00").build(); // perform the staging _STAGING.stage(data); Assert.AreEqual(StagingData.Result.FAILED_INVALID_YEAR_DX, data.getResult()); Assert.AreEqual("brain", data.getSchemaId()); Assert.AreEqual(0, data.getErrors().Count); Assert.AreEqual(0, data.getPath().Count); Assert.AreEqual(0, data.getOutput().Count); }
public void testContentReturnedForInvalidInput() { EodStagingData data = new EodStagingData.EodStagingInputBuilder() .withInput(EodInput.PRIMARY_SITE, "C713") .withInput(EodInput.HISTOLOGY, "8020") .withInput(EodInput.BEHAVIOR, "3") .withInput(EodInput.DX_YEAR, "2018") .withInput(EodInput.EOD_PRIMARY_TUMOR, "200") .withInput(EodInput.EOD_REGIONAL_NODES, "300") .withInput(EodInput.EOD_METS, "00").build(); // perform the staging _STAGING.stage(data); Assert.AreEqual(StagingData.Result.STAGED, data.getResult()); Assert.AreEqual("brain", data.getSchemaId()); Assert.AreEqual(5, data.getErrors().Count); Assert.AreEqual(5, data.getPath().Count); Assert.AreEqual(8, data.getOutput().Count); Assert.AreEqual("1.7", data.getOutput(EodOutput.DERIVED_VERSION.toString())); }