Coder Social home page Coder Social logo

Comments (6)

RandomEngy avatar RandomEngy commented on May 18, 2024

So you'd just want it to make the test file and methods for all the public methods?

from unittestboilerplategenerator.

drobertson123 avatar drobertson123 commented on May 18, 2024

Yes, basically.

The tools allow us to force consistency across the developers. It is a quick way to set up the test class in the right place and the right way. Ideally, I would like to be able to edit the template for the no mock option, but even a basic no frills option would be a huge help.

from unittestboilerplategenerator.

RandomEngy avatar RandomEngy commented on May 18, 2024

I'll put that support on the backlog. For now you could edit the VisualStudio/Moq template and take out the parts you don't need. It will default to Moq when it can't detect any mocking framework.

from unittestboilerplategenerator.

drobertson123 avatar drobertson123 commented on May 18, 2024

Sounds good. Thanks for responding on these.

from unittestboilerplategenerator.

sergedomk avatar sergedomk commented on May 18, 2024

Problem with this approach is that it makes it so you can't use boilerplate to render with Moq on a different project without changing the templates back again.

This is potentially an issue when your requirements for testing your organization's in-house code is different from that of 3rd party open source projects your organization contributes to.

However, it may be more useful to make the Mocking library option "Custom" rather than "None" as "None" implies no mocking and there is also a use-case for changing the parts to reflect other mocking libraries which aren't currently supported.

from unittestboilerplategenerator.

RandomEngy avatar RandomEngy commented on May 18, 2024

Implemented ability to choose "None" for a mock framework in 1.10.5.

In the generated test methods it will have "TODO" for constructor parameters as it has no way to know how to fill them.

from unittestboilerplategenerator.

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.