49 lines
1.1 KiB
C#
49 lines
1.1 KiB
C#
using JdeScoping.ExcelIO.Tests.Fixtures;
|
|
using NPOI.XSSF.UserModel;
|
|
using Shouldly;
|
|
using Xunit;
|
|
|
|
namespace JdeScoping.ExcelIO.Tests.Integration;
|
|
|
|
public class MinimalSearchTests : IClassFixture<MinimalSearchFixture>
|
|
{
|
|
private readonly XSSFWorkbook _workbook;
|
|
|
|
public MinimalSearchTests(MinimalSearchFixture fixture)
|
|
{
|
|
_workbook = fixture.Workbook;
|
|
}
|
|
|
|
[Fact]
|
|
public void SheetCount_IsTwo()
|
|
{
|
|
_workbook.NumberOfSheets.ShouldBe(2);
|
|
}
|
|
|
|
[Fact]
|
|
public void SearchCriteriaSheet_Exists()
|
|
{
|
|
_workbook.GetSheet("Search Criteria").ShouldNotBeNull();
|
|
}
|
|
|
|
[Fact]
|
|
public void SearchResultsSheet_Exists()
|
|
{
|
|
_workbook.GetSheet("Search Results").ShouldNotBeNull();
|
|
}
|
|
|
|
[Fact]
|
|
public void SearchCriteriaSheet_IsProtected()
|
|
{
|
|
var sheet = (XSSFSheet)_workbook.GetSheet("Search Criteria")!;
|
|
sheet.IsSheetLocked.ShouldBeTrue();
|
|
}
|
|
|
|
[Fact]
|
|
public void SearchResultsSheet_IsProtected()
|
|
{
|
|
var sheet = (XSSFSheet)_workbook.GetSheet("Search Results")!;
|
|
sheet.IsSheetLocked.ShouldBeTrue();
|
|
}
|
|
}
|