Coder Social home page Coder Social logo

xayn_architecture's People

Contributors

frankpepermans avatar joecks avatar michaelkmalak avatar peterstojanowski avatar pro100svitlo avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xayn_architecture's Issues

Nullable and error report in useCase

So i found 2 bugs in the use_case related section, both related to the nullable values:

โ„–1

_appThemeHandler = consume(_listenAppThemeUseCase, initialData: none);

consume method receive optional but nullable param initialData.
the problem comes, when useCase input is not nullable.

โ„–2

  useCaseTest<ListenAppThemeUseCase, void, AppTheme>(
    'WHEN storage emit new value THEN useCase emit it as well',
    build: () => useCase,
    setUp: () {
      controller.add(AppTheme.dark);
      controller.close();
    },
    input: [null],
    expect: [useCaseSuccess(AppTheme.dark)],
  );

same thing here, but even worse a bit.
input can receive a list of values. it might be null (as in the example), but the useCase does not accept nullable values.
So in the current setup error will be swallowed by some internal try/catch (probably line 92, use_case_test.dart) and never returned,
The test continues to execute (transaction never called properly cos of the null value) and as result - timeout exception comes

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.