< Summary

Information
Class: WebApi.DAO.MongoDbContext
Assembly: AuthWebApi
File(s): /home/runner/work/SEP4/SEP4/backend/microservices/autorisering/WebApi/DAO/MongoDbContext.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 15
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Database()100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/SEP4/SEP4/backend/microservices/autorisering/WebApi/DAO/MongoDbContext.cs

#LineLine coverage
 1using MongoDB.Driver;
 2
 3namespace WebApi.DAO
 4{
 5    public class MongoDbContext
 6    {
 57        public IMongoDatabase Database { get; }
 8
 59        public MongoDbContext(string connectionString, string databaseName)
 510        {
 511            var client = new MongoClient(connectionString);
 512            Database = client.GetDatabase(databaseName);
 513        }
 14    }
 15}