{"id":19751981,"url":"https://github.com/romfos/testing.autofac","last_synced_at":"2026-02-12T20:02:30.828Z","repository":{"id":62657703,"uuid":"561383537","full_name":"Romfos/Testing.Autofac","owner":"Romfos","description":"Testing library for autofac modules","archived":false,"fork":false,"pushed_at":"2025-02-08T10:19:44.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-08T11:24:47.338Z","etag":null,"topics":["autofac","moq","nsubstitute","testing","unit-test"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Romfos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-03T15:15:35.000Z","updated_at":"2025-02-08T10:19:42.000Z","dependencies_parsed_at":"2023-11-18T02:05:02.824Z","dependency_job_id":"1f076dcc-e831-4b0d-8eed-794ce702e5bb","html_url":"https://github.com/Romfos/Testing.Autofac","commit_stats":{"total_commits":103,"total_committers":3,"mean_commits":"34.333333333333336","dds":"0.46601941747572817","last_synced_commit":"6afa3110b60d01a575a76bee6d561e97d0a1eebd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romfos%2FTesting.Autofac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romfos%2FTesting.Autofac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romfos%2FTesting.Autofac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romfos%2FTesting.Autofac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Romfos","download_url":"https://codeload.github.com/Romfos/Testing.Autofac/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241084166,"owners_count":19907066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autofac","moq","nsubstitute","testing","unit-test"],"created_at":"2024-11-12T02:46:58.263Z","updated_at":"2026-02-12T20:02:25.782Z","avatar_url":"https://github.com/Romfos.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Testing.Autofac\n\nSmall testing library for autofac modules\n\n[![.github/workflows/verify.yml](https://github.com/Romfos/Testing.Autofac/actions/workflows/verify.yml/badge.svg)](https://github.com/Romfos/Testing.Autofac/actions/workflows/verify.yml)\n\n# Nuget\n\n[![Testing.Autofac.NSubstitute](https://img.shields.io/nuget/v/Testing.Autofac.NSubstitute?label=Testing.Autofac.NSubstitute)](https://www.nuget.org/packages/Testing.Autofac.NSubstitute)\n\n# Usage\n\n1. Create TestContainerBuilder\n2. Register autofac modules\n3. Register mocks (NSubstitute or Moq)\n4. Resolve test services\n\n# Usage example (NSubstitute)\n\n```csharp\n[TestMethod]\npublic void ExampleTest()\n{\n    // arrange\n    new TestContainerBuilder()\n        .Module\u003cTestModule\u003e()\n        .Mock(out IBar bar)\n        .Resolve(out IFoo underTest);\n\n    bar.Value().Returns(2);\n\n    // act\n    var actual = underTest.Add(1);\n\n    // assert\n    Assert.AreEqual(3, actual);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromfos%2Ftesting.autofac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromfos%2Ftesting.autofac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromfos%2Ftesting.autofac/lists"}