Files
continuousimprovement/tests/Strata.ContinuousImprovement.Biz.Test.Unit/FreeForm/Opportunities/FFOpportunityServiceTests.cs
T

612 lines
29 KiB
C#

using DocumentFormat.OpenXml.Wordprocessing;
using FluentAssertions;
using Moq;
using NUnit.Framework;
using Strata.Authorization;
using Strata.ContinuousImprovement.Biz.DbContexts;
using Strata.ContinuousImprovement.Biz.FiscalMonths;
using Strata.ContinuousImprovement.Biz.FreeForm.Opportunities;
using Strata.ContinuousImprovement.Biz.FreeForm.Opportunities.Filters;
using Strata.ContinuousImprovement.Biz.Generics;
using Strata.ContinuousImprovement.Biz.Initiatives;
using Strata.ContinuousImprovement.Biz.Pagination;
using Strata.ContinuousImprovement.Biz.Test.Unit.Utilities;
using Strata.ContinuousImprovement.JazzEntityFrameworkStub;
using Strata.Hangfire.Jazz.Client;
using Strata.Hangfire.Jazz.Client.Models;
using Strata.SqlTools.Configuration.Common.AsyncFactory;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using VerifyNUnit;
using VerifyTests;
namespace Strata.ContinuousImprovement.Biz.Test.Unit.FreeForm.Opportunities
{
[ExcludeFromCodeCoverage]
[TestFixture, Category("Unit")]
public class FFOpportunityServiceTests
{
private Mock<IFFOpportunityService> _freeformOpportunityServiceMock;
private Mock<IAsyncDbContextFactory<JazzDbContext>> _dbContextFactoryMock;
private Mock<IJazzDbContext> _jazzDbContextMock;
private Mock<IJazzHangfireServiceClient> _hangfireServiceMock;
private Mock<IAuthorizationServiceClient> _authorizationServiceMock;
private Mock<IFiscalMonthResolver> _fiscalMonthResolverMock;
private IInitiativeService _initiativeService;
private IUpdateFactOpportunitySavingsService _updateFactOpportunitySavingsService;
private VerifySettings _verifySettings;
private static readonly ResourceFileExtractor _extractor = new ResourceFileExtractor(".Resource.");
[SetUp]
public void TestSetUp()
{
_freeformOpportunityServiceMock = new Mock<IFFOpportunityService>();
_dbContextFactoryMock = new Mock<IAsyncDbContextFactory<JazzDbContext>>();
_jazzDbContextMock = new Mock<IJazzDbContext>();
_hangfireServiceMock = new Mock<IJazzHangfireServiceClient>();
_fiscalMonthResolverMock = new Mock<IFiscalMonthResolver>();
_updateFactOpportunitySavingsService = Mock.Of<IUpdateFactOpportunitySavingsService>();
_initiativeService = Mock.Of<IInitiativeService>();
Mock.Get(_updateFactOpportunitySavingsService)
.Setup(s => s.UpdateFactOpportunitySavings(It.IsAny<CancellationToken>()));
Mock.Get(_initiativeService)
.Setup(s => s.DeleteAsync(It.IsAny<Guid>(), It.IsAny<CancellationToken>()))
.Returns(Task.FromResult(true));
_authorizationServiceMock = new Mock<IAuthorizationServiceClient>();
_authorizationServiceMock
.Setup(o => o.AddPermissionsFromDefaultsAsync(It.IsAny<Guid>(), It.IsAny<SecurableEntityType>(), It.IsAny<CancellationToken>()));
_verifySettings = new VerifySettings();
_verifySettings.UseDirectory("snapshots");
_verifySettings.AddNamedGuid(JazzEntityFrameworkFactory.CurrentConfigurationGuid, "ConfigurationGuid");
_verifySettings.ScrubInlineGuids();
}
[Test]
public async Task TestFirstPage_Sorted_Asc()
{
// arrange
var framework = new JazzEntityFrameworkFactory();
await framework.CreateDbContextAsync(CancellationToken.None);
var freeformOpportunityService = new FFOpportunityService(framework, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
var filters = new FFFilters()
{
FinancialImprovementTypes = new List<string>(),
MetricTypes = new List<string>(),
IdentifiedSavings = 0,
ViewVisible = true,
ExcludeInitiatives = false,
OpportunitySearch = "",
ConfigurationGuid = JazzEntityFrameworkFactory.CurrentConfigurationGuid
};
var pagingOptions = new PagingOptions("IdentifiedSavings", SortOrder.Asc);
// act
var taskResult = await freeformOpportunityService
.GetPagedAsync(pagingOptions, filters, CancellationToken.None);
// assert
await Verifier.Verify(taskResult, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
}
[Test]
public async Task TestFirstPage_Sorted_Desc()
{
// arrange
var framework = new JazzEntityFrameworkFactory();
await framework.CreateDbContextAsync(CancellationToken.None);
var freeformOpportunityService = new FFOpportunityService(framework, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
var filters = new FFFilters()
{
FinancialImprovementTypes = new List<string>(),
MetricTypes = new List<string>(),
IdentifiedSavings = 0,
ViewVisible = true,
ExcludeInitiatives = false,
OpportunitySearch = "",
ConfigurationGuid = JazzEntityFrameworkFactory.CurrentConfigurationGuid
};
var pagingOptions = new PagingOptions("IdentifiedSavings", SortOrder.Desc);
// act
var taskResult = await freeformOpportunityService
.GetPagedAsync(pagingOptions, filters, CancellationToken.None);
// assert
await Verifier.Verify(taskResult, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
}
[TestCaseSource(nameof(GetFilterData))]
public async Task TestValidateFilters(FFFilters filters)
{
if (filters == null) return;
await Verifier.Verify(filters, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
}
[TestCaseSource(nameof(TestGetExcelWorkbookNullFilterCases))]
public async Task TestGetExcelWorkbook(FFFilters filters)
{
// arrange
var framework = new JazzEntityFrameworkFactory();
await framework.CreateDbContextAsync(CancellationToken.None);
//var opp = framework.FFOpportunities.First();
var service = new FFOpportunityService(framework, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
// act
var wb = await service.ExportAsync(new SortOptions(), filters, CancellationToken.None);
#pragma warning disable S125 // Sections of code should not be commented out
//wb.SaveAs(System.IO.Path.Combine(@"C:\Git\continuousimprovement\tests\Strata.ContinuousImprovement.Biz.Test.Unit\Resource", "ExcelFilter.xlsx"));
#pragma warning restore S125 // Sections of code should not be commented out
// assert
try
{
await Verifier.Verify(wb.GetDataTables(), _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
}
catch (Exception ex)
{
Console.Write("Verifier.VerifyFile failed. Using back up verification method");
wb.Worksheets.Should().HaveCount(1);
var ws = wb.Worksheet(1);
ws.Should().NotBeNull();
var expected = filters == null
? @"Examples.FreeFormOpportunity.ExcelNullFilter.xlsx"
: @"Examples.FreeFormOpportunity.ExcelFilter.xlsx";
using (var expectedStream = _extractor.ReadFileFromResourceToStream(expected))
using (var actualStream = new MemoryStream())
{
wb.SaveAs(actualStream);
actualStream.Compare(expectedStream, out var message).Should().BeTrue(message);
}
}
}
public static IEnumerable<TestCaseData> TestGetExcelWorkbookNullFilterCases()
{
yield return new TestCaseData(new FFFilters()
{
ConfigurationGuid = JazzEntityFrameworkFactory.CurrentConfigurationGuid,
FinancialImprovementTypes = new[] { ((int)FinancialImprovementType.Revenue).ToString() },
MetricTypes = new[] { ((int)MetricType.FinancialPerUnit).ToString() },
}).SetName("{m} Filtered");
yield return new TestCaseData(null).SetName("{m} Null Filters");
}
[Test]
public async Task TestSetHidden()
{
// arrange
var framework = new JazzEntityFrameworkFactory();
await framework.CreateDbContextAsync(CancellationToken.None);
var opportunities = framework.FFOpportunities;
var opportunity = opportunities.First(vo => !vo.IsHidden);
var isHidden = opportunity.IsHidden;
var service = new FFOpportunityService(framework, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
// act
await service.SetHiddenAsync(opportunity.OpportunityGuid, !isHidden, CancellationToken.None);
// assert
var result = await service.GetById(opportunity.OpportunityGuid, CancellationToken.None);
await Verifier.Verify(result, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
result.IsHidden.Should().Be(!isHidden);
}
[TestCaseSource(typeof(JazzEntityFrameworkFactory), nameof(JazzEntityFrameworkFactory.GetFrameworksWithCancellation))]
public async Task TestGetFilterOptionsAsync(JazzEntityFrameworkFactory jazzEntityFrameworkFactory, CancellationToken cancellationToken)
{
// arrange
var opportunityService = new FFOpportunityService(jazzEntityFrameworkFactory, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
var configurationGuid = JazzEntityFrameworkFactory.CurrentConfigurationGuid;
try
{
// act
var task = await opportunityService
.GetFilterOptionsAsync(configurationGuid, cancellationToken);
// assert
await Verifier.Verify(task, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
}
catch (OperationCanceledException e)
{
await Verifier.Verify(e, _verifySettings)
.ScrubMember("StackTrace")
.UseFileName($"{TestContext.CurrentContext.TestName()} {e.GetType().Name}");
}
}
[TestCaseSource(typeof(JazzEntityFrameworkFactory), nameof(JazzEntityFrameworkFactory.GetFrameworksWithCancellation))]
public async Task TestSetHiddenAsync(JazzEntityFrameworkFactory jazzEntityFrameworkFactory, CancellationToken cancellationToken)
{
// arrange
var freeformOpportunityService = new FFOpportunityService(jazzEntityFrameworkFactory, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
try
{
var opportunities = freeformOpportunityService.GetAllAsync(cancellationToken).Result;
var opportunity = opportunities.FirstOrDefault(o => o.IsHidden);
if (opportunity == null) return;
var isHidden = opportunity.IsHidden;
//act
await freeformOpportunityService.SetHiddenAsync(opportunity.OpportunityGuid, !isHidden,
cancellationToken);
if (string.IsNullOrEmpty(jazzEntityFrameworkFactory.TestName)) return;
var result = freeformOpportunityService.GetById(opportunity.OpportunityGuid, cancellationToken).Result;
await Verifier.Verify(result.IsHidden, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
}
catch (AggregateException e)
{
await Verifier.Verify(e.InnerException, _verifySettings)
.ScrubMember("StackTrace")
.UseFileName($"{TestContext.CurrentContext.TestName()} {e.InnerException.GetType().Name}");
}
}
[TestCaseSource(typeof(JazzEntityFrameworkFactory), nameof(JazzEntityFrameworkFactory.GetFrameworksWithCancellation))]
public async Task TestSetHiddenAsync_NoOpportunity(JazzEntityFrameworkFactory jazzEntityFrameworkFactory, CancellationToken cancellationToken)
{
// arrange
var opportunity = jazzEntityFrameworkFactory.FFOpportunities.FirstOrDefault(o => o.IsHidden);
if (opportunity == null) return;
var isHidden = opportunity.IsHidden;
var freeformOpportunityService = new FFOpportunityService(jazzEntityFrameworkFactory, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
try
{
// act
await freeformOpportunityService.SetHiddenAsync(Guid.Empty, !isHidden,
cancellationToken);
}
catch (OperationCanceledException e)
{
await Verifier.Verify(e, _verifySettings)
.ScrubMember("StackTrace")
.UseFileName(TestContext.CurrentContext.TestName());
}
}
[TestCaseSource(typeof(JazzEntityFrameworkFactory), nameof(JazzEntityFrameworkFactory.GetFrameworksWithCancellation))]
public async Task TestSetNoteAsync(JazzEntityFrameworkFactory jazzEntityFrameworkFactory, CancellationToken cancellationToken)
{
// arrange
var freeformOpportunityService = new FFOpportunityService(jazzEntityFrameworkFactory, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
try
{
var opportunities = freeformOpportunityService.GetAllAsync(cancellationToken).Result;
var opportunity = opportunities.FirstOrDefault(o => o.Note == string.Empty);
if (opportunity == null) return;
var note = "new test note";
// act
await freeformOpportunityService.SetNoteAsync(opportunity.OpportunityGuid, note, CancellationToken.None);
if (cancellationToken.IsCancellationRequested || jazzEntityFrameworkFactory.JazzDbContext == null)
{
var result = async () => await freeformOpportunityService.GetById(opportunity.OpportunityGuid, cancellationToken);
// assert
await Verifier.ThrowsTask(result, _verifySettings)
.ScrubMember("StackTrace")
.UseFileName(TestContext.CurrentContext.TestName());
}
else
{
var result = await freeformOpportunityService.GetById(opportunity.OpportunityGuid, cancellationToken);
// assert
await Verifier.Verify(result.Note, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
}
}
catch (AggregateException e)
{
await Verifier.Verify(e.InnerException, _verifySettings)
.ScrubMember("StackTrace")
.UseFileName($"{TestContext.CurrentContext.TestName()} {e.InnerException.GetType().Name}");
}
}
[Test]
public async Task TestSetNote()
{
// arrange
var framework = new JazzEntityFrameworkFactory();
await framework.CreateDbContextAsync(CancellationToken.None);
var opportunities = framework.UVOpportunities;
var opportunity = opportunities.First(vo => string.IsNullOrEmpty(vo.Note));
var note = opportunity.Note;
var expected = "Now is the time for all good engineers to write great code!";
var service = new FFOpportunityService(framework, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
// act
await service.SetNoteAsync(opportunity.OpportunityGuid, expected, CancellationToken.None);
// assert
var result = await service.GetById(opportunity.OpportunityGuid, CancellationToken.None);
await Verifier.Verify(result.Note, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
result.Note.Should().NotBeNullOrEmpty()
.And.NotBe(note)
.And.Be(expected);
}
[TestCaseSource(typeof(JazzEntityFrameworkFactory), nameof(JazzEntityFrameworkFactory.GetFrameworksWithCancellation))]
public async Task TestSetNoteAsync_NoOpportunity(JazzEntityFrameworkFactory jazzEntityFrameworkFactory, CancellationToken cancellationToken)
{
// arrange
var opportunity = jazzEntityFrameworkFactory.FFOpportunities.FirstOrDefault(o => o.Note == string.Empty);
if (opportunity == null) return;
var note = "new test note";
var freeformOpportunityService = new FFOpportunityService(jazzEntityFrameworkFactory, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
try
{
// act
await freeformOpportunityService.SetNoteAsync(Guid.Empty, note, cancellationToken);
// assert
}
catch (OperationCanceledException e)
{
await Verifier.Verify(e, _verifySettings)
.ScrubMember("StackTrace")
.UseFileName(TestContext.CurrentContext.TestName());
}
}
[TestCaseSource(typeof(JazzEntityFrameworkFactory), nameof(JazzEntityFrameworkFactory.GetFrameworks))]
public async Task TestGetAllAsync(JazzEntityFrameworkFactory jazzEntityFrameworkFactory)
{
// arrange
var freeformOpportunityService = new FFOpportunityService(jazzEntityFrameworkFactory, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
// act
var taskResult = await freeformOpportunityService.GetAllAsync(CancellationToken.None);
// assert
await Verifier.Verify(taskResult, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
if (string.IsNullOrEmpty(jazzEntityFrameworkFactory.TestName))
{
taskResult.Should().BeNullOrEmpty();
}
else
{
taskResult.Should().NotBeNullOrEmpty();
}
}
[TestCaseSource(typeof(JazzEntityFrameworkFactory), nameof(JazzEntityFrameworkFactory.GetFrameworks))]
public async Task TestGetById(JazzEntityFrameworkFactory jazzEntityFrameworkFactory)
{
// arrange
var freeformOpportunityService = new FFOpportunityService(jazzEntityFrameworkFactory, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
// act
var tempResult = await freeformOpportunityService.GetAllAsync(CancellationToken.None);
var taskResult =
await freeformOpportunityService.GetById(tempResult.FirstOrDefault()?.OpportunityGuid ?? Guid.Empty, CancellationToken.None);
// assert
await Verifier.Verify(taskResult, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
if (string.IsNullOrEmpty(jazzEntityFrameworkFactory.TestName))
{
taskResult.Should().BeNull();
}
else
{
taskResult.Should().NotBeNull()
.And.BeOfType<FFOpportunity>();
}
}
[TestCaseSource(typeof(JazzEntityFrameworkFactory), nameof(JazzEntityFrameworkFactory.GetFrameworks))]
public async Task TestGetByIds(JazzEntityFrameworkFactory jazzEntityFrameworkFactory)
{
// arrange
var freeformOpportunityService = new FFOpportunityService(jazzEntityFrameworkFactory, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
// act
var tempResult = await freeformOpportunityService.GetAllAsync(CancellationToken.None);
var ids = tempResult.Select(o => o.OpportunityGuid);
var taskResult = await freeformOpportunityService.GetByIds(ids, CancellationToken.None);
// assert
await Verifier.Verify(taskResult, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
if (string.IsNullOrEmpty(jazzEntityFrameworkFactory.TestName))
{
taskResult.Should().BeNullOrEmpty();
}
else
{
taskResult.Should().NotBeNullOrEmpty()
.And.AllBeOfType<FFOpportunity>();
}
}
[TestCaseSource(typeof(JazzEntityFrameworkFactory), nameof(JazzEntityFrameworkFactory.GetFrameworks))]
public async Task TestCreateFreeFormOpportunity(JazzEntityFrameworkFactory jazzEntityFrameworkFactory)
{
// arrange
var freeformOpportunityService = new FFOpportunityService(jazzEntityFrameworkFactory, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
var authorGuid = Guid.NewGuid();
var configurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345");
var newOpportunity = new FFOpportunityDataModel()
{
AuthorName = "TestAuthor",
AuthorGuid = authorGuid,
ConfigurationGuid = configurationGuid,
Denominator = "Patient Days",
Numerator = "Imaging Procedure",
FinancialImprovementType = FinancialImprovementType.Cost,
MetricType = MetricType.Financial,
Name = "Test"
};
_hangfireServiceMock.Setup(x => x.EnqueueJobAsync(It.IsAny<EnqueueJobDto>(), It.IsAny<CancellationToken>())).ReturnsAsync(new JobEnqueuedResponse() { JobId = Guid.Parse("d47bea06-37bb-440e-82d9-cec74e523e01") });
try
{
// act
var result = await freeformOpportunityService.CreateAsync(newOpportunity, CancellationToken.None);
// assert
await Verifier.Verify(result, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
}
catch (NullReferenceException e)
{
await Verifier.Verify(e, _verifySettings)
.ScrubMember("StackTrace")
.UseFileName($"{TestContext.CurrentContext.TestName()} {e.GetType().Name}");
}
}
[TestCaseSource(typeof(JazzEntityFrameworkFactory), nameof(JazzEntityFrameworkFactory.GetFrameworks))]
public async Task TestCreateFreeFormOpportunityPreventsDuplicateNames(JazzEntityFrameworkFactory jazzEntityFrameworkFactory)
{
// arrange
var freeformOpportunityService = new FFOpportunityService(jazzEntityFrameworkFactory, null, null, _hangfireServiceMock.Object,
_fiscalMonthResolverMock.Object,
_initiativeService, _updateFactOpportunitySavingsService,
_authorizationServiceMock.Object);
var newOpportunity = new FFOpportunityDataModel()
{
Name = "Free Form Opportunity 1",
AuthorName = "TestAuthor",
AuthorGuid = Guid.NewGuid(),
ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345"),
FinancialImprovementType = FinancialImprovementType.Cost,
MetricType = MetricType.Financial,
};
_hangfireServiceMock.Setup(x => x.EnqueueJobAsync(It.IsAny<EnqueueJobDto>(), It.IsAny<CancellationToken>())).ReturnsAsync(new JobEnqueuedResponse() { JobId = Guid.Parse("d47bea06-37bb-440e-82d9-cec74e523e01") });
if (!TestContext.CurrentContext.Test.Name.Contains("With Framework"))
{
// act
var result = async () => await freeformOpportunityService.CreateAsync(newOpportunity, CancellationToken.None);
// assert
await Verifier.ThrowsTask(result, _verifySettings)
.ScrubMember("StackTrace")
.UseFileName(TestContext.CurrentContext.TestName());
}
else
{
// act
var result = await freeformOpportunityService.CreateAsync(newOpportunity, CancellationToken.None);
// assert
await Verifier.Verify(result, _verifySettings)
.UseFileName(TestContext.CurrentContext.TestName());
}
}
[TearDown]
public void TestTearDown()
{
// Method intentionally left empty.
}
#region TestCaseData
public static IEnumerable<TestCaseData> GetFilterData()
{
yield return new TestCaseData(new FFFilters { ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345") }).SetName("{m} No Filters");
yield return new TestCaseData(new FFFilters { ViewVisible = true, ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345") }).SetName("{m} View Visible");
yield return new TestCaseData(new FFFilters { ViewVisible = false, ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345") }).SetName("{m} Not View Visible");
yield return new TestCaseData(new FFFilters { IdentifiedSavings = 1999, ViewVisible = true, ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345") })
.SetName("{m} By Identified Savings");
yield return new TestCaseData(new FFFilters { IdentifiedSavings = 999, ViewVisible = false, ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345") })
.SetName("{m} By Identified Savings Not ViewVisible");
yield return new TestCaseData(new FFFilters { FinancialImprovementTypes = new[] { "1" }, ViewVisible = true, ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345") })
.SetName("{m} By FinancialImprovementType");
yield return new TestCaseData(new FFFilters { FinancialImprovementTypes = new[] { "2" }, ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345"), ViewVisible = false })
.SetName("{m} By FinancialImprovementType Not ViewVisible");
yield return new TestCaseData(new FFFilters { MetricTypes = new[] { "1" }, ViewVisible = true, ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345") })
.SetName("{m} By MetricType");
yield return new TestCaseData(new FFFilters { MetricTypes = new[] { "2" }, ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345"), ViewVisible = false })
.SetName("{m} By MetricType Not ViewVisible");
yield return new TestCaseData(new FFFilters { OpportunitySearch = "QV - 123", ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345") })
.SetName("{m} Search By Id");
yield return new TestCaseData(new FFFilters { ExcludeInitiatives = true, ConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345") })
.SetName("{m} Exclude Opportunities with Initiatives");
}
#endregion
}
}