Code Monkey home page Code Monkey logo

Comments (4)

robdmoore avatar robdmoore commented on August 16, 2024

That's by design :)

When you Get a value it generates an anonymous value as per http://dossier.teststack.net/docs/anonymous-values-and-equivalence-classes.

If you want the default value to be returned for the type if it's not set then use GetOrDefault rather than Get.

from teststack.dossier.

cottsak avatar cottsak commented on August 16, 2024

@robdmoore This is extremely unsettling. I don't know how a user would find this the implicit behavior. I would expect most folks to be surprised (like me) when they discover the default value for the type is not the default from Get. It's not intention revealing and forced me to log an issue, when TBH, I wasn't going to search doco for something which didn't present as anything other than a bug.

from teststack.dossier.

robdmoore avatar robdmoore commented on August 16, 2024

The anonymous value support is a very important part of Dossier - it allows you to make your builders even terser by negating the need to define Set calls in the ctor for most builders. It also allows you to make use of the equivalence class pattern and comes into it's own when building lists of objects since they all come out with different values.

from teststack.dossier.

cottsak avatar cottsak commented on August 16, 2024

Perhaps it's because I don't often use those other features, I can't appreciate their needs in influencing this behavior.

from teststack.dossier.

Related Issues (20)

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.