Giter Club home page Giter Club logo

Comments (5)

rasmusjp avatar rasmusjp commented on June 9, 2024 1

I'm closing this as I've done a larger rewrite and all the new code is tested.

from umbraco-graphql.

rasmusjp avatar rasmusjp commented on June 9, 2024

Yes, I think it would be a good time to look into it. It's been on my todo list for a while now, but I've only got as far as creating the test project (which I've just committed and pushed).

from umbraco-graphql.

mattbrailsford avatar mattbrailsford commented on June 9, 2024

from umbraco-graphql.

rasmusjp avatar rasmusjp commented on June 9, 2024

All the help we can get on this is much appreciated :-)

I've made some changes in the umbraco8 branch were a lot of the stuff has interfaces now (to make it work nicely with the DI), this should make it easier to do unit tests i think.

from umbraco-graphql.

lars-erik avatar lars-erik commented on June 9, 2024

Without knowing much about the project nor graphql there's not much I can give. ;)

But a general advice is to stub as close to IO as possible to test as many participants as possible at once. If this is using the content cache, I'd go with the xml overriding technique with Umbraco's own tests:
https://github.com/lars-erik/umbraco-unit-testing-samples/blob/master/Umb.Testing.Tests/SampleUmbracoTests/ContentCache_From_Xml.cs

If you're exposing a WebApi endpoint you can actually test that through HTTP hosting your endpoint from your test process. Here's an example of doing it for OData.
https://intellitect.com/self-hosted-integration-testing-of-odata-and-webapi/
(found from serp)

Other than that, read TDD books and just get started. :) Can't swim if you don't jump in.

from umbraco-graphql.

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.