public void UsesProvidedGenericComparison() { var comparer = new GenericComparison <int>(); Assert.That(rangeConstraint.Using(comparer.Delegate).ApplyTo(19).IsSuccess); Assert.That(comparer.WasCalled, "Comparer was not called"); }
public void UsesProvidedGenericComparison() { var comparer = new GenericComparison <int>(); Assert.That(new[] { 1, 2 }, Is.Ordered.Using(comparer.Delegate)); Assert.That(comparer.WasCalled, "Comparer was not called"); }
public void AllItemsAreInRange_UsingGenericComparison() { var comparer = new GenericComparison<int>(); int[] c = new int[] { 12, 27, 19, 32, 45, 99, 26 }; Assert.That(c, new AllItemsConstraint(new RangeConstraint(10, 100).Using(comparer.Delegate))); Assert.That(comparer.WasCalled); }
public void UsesProvidedGenericComparison() { var comparer = new GenericComparison <int>(); Assert.That(2 + 2, Is.EqualTo(4).Using(comparer.Delegate)); Assert.That(comparer.WasCalled, "Comparer was not called"); }
public void AllItemsAreInRange_UsingGenericComparison() { var comparer = new GenericComparison<int>(); int[] c = new int[] { 12, 27, 19, 32, 45, 99, 26 }; Assert.That(c, new AllItemsConstraint(new RangeConstraint<int>(10, 100).Using(comparer.Delegate))); Assert.That(comparer.WasCalled); }
public void UsesProvidedGenericComparison() { var al = new List <int>(); al.Add(1); al.Add(2); var comparer = new GenericComparison <int>(); Assert.That(al, Is.Ordered.Using(comparer.Delegate)); Assert.That(comparer.WasCalled, "Comparer was not called"); }
public IActionResult Post(IFormFile fileOne, string FileOneSourceName, string FileOneSheetName, int FileOnePrimaryKeyIndex, int FileOneComparisonOneIndex, int FileOneComparisonTwoIndex, int FileOneComparisonThreeIndex, IFormFile fileTwo, string FileTwoSheetName, string FileTwoSourceName, int FileTwoPrimaryKeyIndex, int FileTwoComparisonOneIndex, int FileTwoComparisonTwoIndex, int FileTwoComparisonThreeIndex) { IWorkbook FileOneWorkbook; try { FileOneWorkbook = WorkbookFactory.Create(fileOne.OpenReadStream()); } catch (Exception) { ViewBag.String = "One of the Excel files is either not an .XLS file or was not uploaded."; return(View()); } IWorkbook FileTwoWorkbook = WorkbookFactory.Create(fileTwo.OpenReadStream()); ISheet sheetOne = FileOneWorkbook.GetSheet(FileOneSheetName); ISheet sheetTwo = FileTwoWorkbook.GetSheet(FileTwoSheetName); string result = GenericComparison.compare(FileOneWorkbook, FileOneSheetName, FileOneSourceName, FileOnePrimaryKeyIndex, FileTwoWorkbook, FileTwoSheetName, FileTwoSourceName, FileTwoPrimaryKeyIndex, FileOneComparisonOneIndex, FileTwoComparisonOneIndex, FileOneComparisonTwoIndex, FileTwoComparisonTwoIndex, FileOneComparisonThreeIndex, FileTwoComparisonThreeIndex); ViewBag.String = result; return(View()); }
public void UsesProvidedGenericComparison() { var comparer = new GenericComparison<int>(); Assert.That(rangeConstraint.Using(comparer.Delegate).ApplyTo(19).IsSuccess); Assert.That(comparer.WasCalled, "Comparer was not called"); }
public void UsesProvidedGenericComparison() { var comparer = new GenericComparison<int>(); Assert.That(new[] { 1, 2 }, Is.Ordered.Using(comparer.Delegate)); Assert.That(comparer.WasCalled, "Comparer was not called"); }
public void UsesProvidedGenericComparison() { var al = new List<int>(); al.Add(1); al.Add(2); var comparer = new GenericComparison<int>(); Assert.That(al, Is.Ordered.Using(comparer.Delegate)); Assert.That(comparer.WasCalled, "Comparer was not called"); }