Skip to content

Dm 8028 unit test utility #212

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

Merged
merged 2 commits into from
Oct 20, 2016
Merged

Dm 8028 unit test utility #212

merged 2 commits into from
Oct 20, 2016

Conversation

lznakano
Copy link
Contributor

@lznakano lznakano commented Oct 19, 2016

A utility class, FileLoader, is added. It is in the packageedu.caltech.ipac.firefly.util under the test tree. Following 8 files are modified accordingly:

HistogramTest.java
ProjectionTest.java
HistogramProcessorTest
StatisticProcessorTest
PhaseFoldedLightCurveTest
IpactableTest
ZscaleTest
GridTest

To test it, please check out of this branch and also the data branch in firefly_test_data. The data branch has exactly the same name.

DM-7783 is depending on this branch. Once it is merged, the DM-7783 can be finalized.

Copy link
Contributor

@loitly loitly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review is done. Merge when ready.

}
}

public static File loadFile(Class cls, String tblFile) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is poorly named. Should be resolveFile(Class cls, String fname) or something like it.
You are not loading anything and it has nothing to do with table.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It reads a table fie in the test tree and returns a DataGroup object. I have named:
loadFIts: return a FITS
loadFitsRead: return a FitsRead
loadFitsReadArray: return a FitsRead array
loadFile : return a File

Does it make more sense if it is named as loadDataGroup?

@lznakano lznakano force-pushed the DM-8028-UnitTestUtility branch from 8b7b5a8 to 5f47879 Compare October 20, 2016 22:30
@lznakano lznakano merged commit 0068713 into dev Oct 20, 2016
@robyww robyww deleted the DM-8028-UnitTestUtility branch October 24, 2016 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants