Git Product home page Git Product logo

Comments (4)

sshushliapin avatar sshushliapin commented on July 17, 2024

See no way to dispose the db which is critical. That's weird...
AutoFixture/AutoFixture#17

from sitecore.fakedb.

sshushliapin avatar sshushliapin commented on July 17, 2024

AutoFixture is about automating non-relevant Test Fixture Setup. That is not something applicable to the concrete item deserialization.
The Xunit's DataAttribute is the right way to go.

from sitecore.fakedb.

sshushliapin avatar sshushliapin commented on July 17, 2024

I was wrong about assigning the invalid label. It does may sense to integrate with the @AutoFixture. The integration should not deal with item serializations as I originally thought. It should 'concentrate' on the test data generating:

Its primary goal is to allow developers to focus on what is being tested rather than how to setup the test scenario

In case of Sitecore, FakeDb should help AutoFixture to 'generate' complex types such as Item, Database or even PipelineArgs (yes, you won't be able to generate it easily without FakeDb):

[Theory, AutoDbData]
public void ShouldCreateContentItem([Content]Item item)
{
  // act
  var result = Database.GetItem(item.Uri);

  // assert
  result.Should().NotBeNull();
}

from sitecore.fakedb.

sshushliapin avatar sshushliapin commented on July 17, 2024

Released as 0.29.0

from sitecore.fakedb.

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.