using System; using System.Collections.Generic; using System.Linq; using System.Text; using Domain.Repositories; using Domain.Entities; using NUnit.Framework; using Moq; namespace UnitTests { public static class UnitTestUtils { public static void AssertEqual(this T value, T expected) { Assert.AreEqual(value, expected); } public static IFilmsRepository MockFilmsRepository(params Film[] films) { // Generate an implementer of IFilmsRepository at runtime using Moq. var mockProductsRepos = new Mock(); mockProductsRepos.Setup(x => x.Films).Returns(films); return mockProductsRepos.Object; } } }