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

MVVM testing #33

Open
7 of 13 tasks
zspitz opened this issue Sep 26, 2019 · 5 comments
Open
7 of 13 tasks

MVVM testing #33

zspitz opened this issue Sep 26, 2019 · 5 comments

Comments

@zspitz
Copy link
Owner

zspitz commented Sep 26, 2019

  • Create a token stream, then a parse tree from the input
  • successfully construct visualizer data from string, token stream, and parse tree
  • successfully construct a viewmodel from visualizer data
  • Pass an invalid/missing config to VisualizerData constructor
    • invalid lexer
    • invalid parser
    • invalid method name
  • deserialize visualizerdata, configviewmodel, visualizerdataviewmodel from stored JSON; compare against constructed
  • change selection on viewmodel; verify changes to selection
    • from viewmodel selection source properties
    • from root treeview model
    • from token list
  • Config.Clone

Relevant: https://www.pluralsight.com/courses/wpf-mvvm-test-driven-development-viewmodels

Questions:

  • Should we test autofill of lexer and parser when there is no selected? Currently we can test this, because there is only one lexer and parser in all the loaded assemblies. But we may add more lexers and parsers in the future.
@zspitz
Copy link
Owner Author

zspitz commented Nov 8, 2019

The only known bug related to selection is #42.

@zspitz
Copy link
Owner Author

zspitz commented Nov 8, 2019

Test cases (two test projects):

  • Antlr.Standard.Runtime -- Java ANTLR-generated lexer + parser, reference DLL
    • short Java file
    • long Java file
    • short Java file with errors
  • Antlr.Runtime -- antlr-cs - generated lexer + parser, reference RubberDuck DLL
    • short VBA input
    • long VBA input
    • short VBA input with errors

@zspitz
Copy link
Owner Author

zspitz commented Nov 12, 2019

Should the test project be in .NET Framework or .NET Core?

Antlr.Runtime can only be used from .NET Framework, so any tests which target this must use .NET Framework.

Tests against Antlr.Runtime.Standard can be either in .NET Framework or .NET Core.

zspitz added a commit that referenced this issue Nov 21, 2019
zspitz added a commit that referenced this issue Nov 25, 2019
@zspitz zspitz mentioned this issue Jul 7, 2021
18 tasks
@zspitz
Copy link
Owner Author

zspitz commented Jul 23, 2021

Related #60

@zspitz
Copy link
Owner Author

zspitz commented Jul 23, 2021

Should the test project be in .NET Framework or .NET Core?

Antlr.Runtime can only be used from .NET Framework, so any tests which target this must use .NET Framework.

Tests against Antlr.Runtime.Standard can be either in .NET Framework or .NET Core.

We've resolved this. Antlr.Runtime can be used from .NET Framework, .NET Core, and .NET 5. Test projects target net5.0-windows; there's currently no need for multitargeting.

zspitz added a commit that referenced this issue Jul 25, 2021
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