Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimeatstariongroup committed Dec 6, 2023
1 parent cb51dd1 commit 9ccd3ae
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ namespace COMET.Web.Common.Tests.Services.SessionManagement

using COMET.Web.Common.Enumerations;
using COMET.Web.Common.Services.SessionManagement;

using Microsoft.Extensions.Logging;

using Moq;

using NUnit.Framework;
Expand All @@ -59,8 +62,13 @@ public class SessionServiceTestFixture
[SetUp]
public void Setup()
{
var logger = new Mock<ILogger<SessionService>>();

this.session = new Mock<ISession>();
this.sessionService = new SessionService { Session = this.session.Object };
this.sessionService = new SessionService(logger.Object)
{
Session = this.session.Object
};
this.assembler = new Assembler(this.uri);
this.domain = new DomainOfExpertise(Guid.NewGuid(), this.assembler.Cache, this.uri);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ namespace COMETwebapp.Tests.Components.SystemRepresentation
using COMETwebapp.ViewModels.Components.SystemRepresentation;

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

using Moq;

Expand Down Expand Up @@ -74,10 +75,15 @@ public class SystemRepresentationPageTestFixture
[SetUp]
public void SetUp()
{
this.context = new TestContext();
var logger = new Mock<ILogger<SessionService>>();

this.context = new TestContext();
this.session = new Mock<ISession>();
this.sessionService = new SessionService { Session = this.session.Object };

this.sessionService = new SessionService(logger.Object)
{
Session = this.session.Object
};

this.context.Services.AddSingleton(this.sessionService);
this.context.ConfigureDevExpressBlazor();
Expand Down

0 comments on commit 9ccd3ae

Please sign in to comment.