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

Expand QueueModel tests #7

Open
eLopez6 opened this issue Apr 1, 2019 · 4 comments
Open

Expand QueueModel tests #7

eLopez6 opened this issue Apr 1, 2019 · 4 comments
Assignees

Comments

@eLopez6
Copy link
Collaborator

eLopez6 commented Apr 1, 2019

There are too few tests for QueueModelTest. And we need to test more behavior.

@eLopez6 eLopez6 self-assigned this Apr 1, 2019
@eLopez6
Copy link
Collaborator Author

eLopez6 commented Apr 1, 2019

Running into an exception when attempting to running the old test suite.

@eLopez6
Copy link
Collaborator Author

eLopez6 commented Apr 7, 2019

This some stuff that I'm lost on how to use correctly:

From setupClass()

    	// Ensure that there are no existing library files
    	Main.resource.getResourceFileClass("test_out>QueueModelTest>library", App.class).create().delete();

        settings = new SettingsModel(Main.resource.getResourceFileClass("settings.ser", App.class));
        library = new LibraryModel(settings, Main.resource.getResourceFolderClass("test_out>QueueModelTest>library", App.class));

And from setup

        Main.resource.getResourceFileClass("test_out>QueueModelTest>test_meta.ser", App.class).create().delete();

        testAudio = new BAudioLocal(settings,
                                    Main.resource.getResourceFileClass("test_out>QueueModelTest>test_meta.ser", App.class),
                                    Main.resource.getResourceFileClass("test_in>test.mp3", App.class).getPath().toUri());
        queueModel.setQueue(library, testAudio);

So it seems like to me, the creation of the BAudioLocal should be associating it with the test meta info. But when I look at the loaded queue in a debugger, I don't think I see it.

@eLopez6
Copy link
Collaborator Author

eLopez6 commented Apr 7, 2019

And more detail again: I get an IndexOutOfBoundsException on queue.get(), which would mean the audio file created is not actually in the queue. Or maybe library.

@eLopez6
Copy link
Collaborator Author

eLopez6 commented Apr 8, 2019

I've written some skeleton-ish code for this. Definitely not as implemented as I would like to be. But the QueueModel is a little more complicated to write tests for than I realized given the resource folder issue that Kienan is working on.

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

No branches or pull requests

1 participant