GithubHelp home page GithubHelp logo

Comments (3)

vagosdim avatar vagosdim commented on July 19, 2024

GlobalDataKeeper

-Almost all data of the tool
-Isolate the method we want to test from the datakeeper -> void setData()

Example1: Test TreeConstruction class => fake DataKeeper => create FakeDataKeeper which extends DataKeeper and overwrites the setData(), method and populates some of the attributes of DataKeeper with simple data instead of parsing real data and stuff.

General idea:

  1. Create FakeClass that extends original
  2. Create fakeMethod() that overwrites original
  3. Create UnitTest

ex. testConstructTree() method

from l1-software-data-evolution.

vagosdim avatar vagosdim commented on July 19, 2024

More General Tests -> Too much in the Gui!
-Compare what is illustrated in a JTable before and after the change

  • Three attributes:

    1. detailedModel
    2. generalModel
    3. zoomModel
      --> dump contents in some text file, then do the changes. To test, compare the file contents of the original table models and compare to the contents of the refactored.
  • Gui ==> change the above mentioned attributes to protected instead of private to do the tests. (protected renders attributes accessible within the same package without accessor methods)

  • Need to offload the class:
    Options:

    1. subclass the Gui
    2. (the one we want) BuissnessLogicClass to offload code for loading in the Gui ==> acts as a intermediary between DataKeeper and Gui with load methods
  • So as not to populate the code much, dump contents to .txt files and do the tests by comparing the contents to the .txt.

  • In the Gui there are methods that do some useful process on data --> move the logic to the Data Keeper "Move behavior close to Data" --> Make Data class a "service provider".

Example: constructColumns() @Class TableConstructor

from l1-software-data-evolution.

vagosdim avatar vagosdim commented on July 19, 2024

14/04 Notes

Do a little refactoring for the tests!!!

  • The Server class --> push use cases to the server classes.
  • Take code inside action listeners to server class --> need to refactor before testing, tool is not in a consistent state.
    ex. Show FullDetailedLifetime

USE CASES

  1. Create new Project
  2. Load existing project
  3. Zoom in/out
  4. Parameter lists

from l1-software-data-evolution.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.