protected override void SetupNewDatabase(DbContextOptions <IPOContext> dbContextOptions) { using (new IPOContext(dbContextOptions, _plantProvider, _eventDispatcher, _currentUserProvider)) { person = new ProCoSysPerson() { AzureOid = "123456", FirstName = "F1", LastName = "F2", UserName = "******", Email = "*****@*****.**" }; _functionalRoleApiServiceMock = new Mock <IFunctionalRoleApiService>(); _libraryApiFunctionalRoles = new List <ProCoSysFunctionalRole> { new ProCoSysFunctionalRole() { Code = "C1", Description = "D1", Email = "*****@*****.**", InformationEmail = "*****@*****.**", UsePersonalEmail = true }, new ProCoSysFunctionalRole { Code = "C2", Description = "D2", Email = "*****@*****.**", InformationEmail = "*****@*****.**", UsePersonalEmail = false, Persons = new List <ProCoSysPerson>() { person } } }; _functionalRoleApiServiceMock .Setup(x => x.GetFunctionalRolesByClassificationAsync(TestPlant, _classification)) .Returns(Task.FromResult(_libraryApiFunctionalRoles)); _query = new GetFunctionalRolesForIpoQuery(_classification); } }
public void Constructor_SetsProperties() { const string Classification = "IPO"; var dut = new GetFunctionalRolesForIpoQuery(Classification); Assert.AreEqual(Classification, dut.Classification); }