Пример #1
0
 public void should_throw_on_bad_error_type()
 {
    var col = _loadedRepository.ObservationColumns().First();
    var name = new ShortGuid().ToString();
    The.Action(() => sut.AddErrorColumn(col, name, "something else")).ShouldThrowAn<OSPSuiteException>();
 }
Пример #2
0
 public void should_throw_ospsuite_exception_for_fill_data_table_unit_row_negative()
 {
     The.Action(() => sut.ImportDataTables(_importDataTable, _excelFile, _sheetNames[0], 0, -2, 1, -1, _cms)).
     ShouldThrowAn <OSPSuiteException>();
 }
Пример #3
0
 public void should_throw_mobi_exception()
 {
     The.Action(() => sut.Remove(_spatialStructure, _project, null, false)).ShouldThrowAn <MoBiException>();
 }
Пример #4
0
 public void should_throw_exception_file_not_found_for_getting_column_names()
 {
     The.Action(() => sut.GetColumnNames(_excelFile + "Unknown", _sheetNames[0], 0)).ShouldThrowAn <FileNotFoundException>();
 }
Пример #5
0
 public void should_throw_exception_invalid_sheet_for_fill_data_table()
 {
     The.Action(
         () => sut.ImportDataTables(_importDataTable, _excelFile, "Unknown sheet", 0, 0, 1, -1, _cms)).ShouldThrowAn
     <SheetNotFoundException>();
 }
Пример #6
0
 public void should_get_preview_should_throw_argument_out_of_range()
 {
     The.Action(() => sut.GetPreview(_excelFile, -1, A.Fake <Cache <string, Rectangle> >())).ShouldThrowAn <ArgumentOutOfRangeException>();
 }
Пример #7
0
 public void should_throw_ospsuite_exception_if_data_end_row_less_than_data_start_row()
 {
     The.Action(() => sut.ImportDataTables(_importDataTable, _excelFile, _sheetNames[0], 0, 0, 5, 4, _cms)).ShouldThrowAn <OSPSuiteException>();
 }
Пример #8
0
 public void should_returns_that_the_software_has_indeed_a_no_newer_version()
 {
     The.Action(() => sut.NewVersionIsAvailable()).ShouldThrowAn <OSPSuiteException>();
 }
Пример #9
0
 public void should_throw_an_exception_if_both_neighbors_are_matching_the_criteria()
 {
     The.Action(() => sut.GetNeighborSatisfying(_criteriaForBothNeighbors)).ShouldThrowAn <OSPSuiteException>();
 }
Пример #10
0
 public void should_throw_an_exception()
 {
     The.Action(() => sut.RemoveSimulationIntervalFrom(_simulatinIntervalToRemove, _simulationOutput)).ShouldThrowAn <CannotDeleteSimulationIntervalException>();
 }
 public void should_throw_a_calculation_method_not_found_exception()
 {
     The.Action(() => sut.FindBy("toto")).ShouldThrowAn <CalculationMethodNotFoundException>();
 }
Пример #12
0
 public void should_throw_an_not_unique_name_exeception()
 {
     The.Action(() => sut.Add(_stefanSwitch)).ShouldThrowAn <NotUniqueNameException>();
 }
Пример #13
0
 public void should_throw_an_error()
 {
    The.Action(() => sut.SetColumnOrigin(_column, "TOTO")).ShouldThrowAn<Exception>();
 }
Пример #14
0
 public void should_throw_an_exception_if_removing_a_base_grid_and_the_data_repository_has_other_column()
 {
    var baseGrid = _dataRepository.BaseGrid;
    The.Action(() => sut.RemoveColumn(_dataRepository, baseGrid)).ShouldThrowAn<OSPSuiteException>();
 }
Пример #15
0
 public void should_throw_a_no_mapper_can_be_found_exception()
 {
     The.Action(() => sut.MapToSnapshot(_model)).ShouldThrowAn <SnapshotNotFoundException>();
 }
 public void should_throw_an_exception()
 {
     The.Action(() => sut.Compute(_variableValues, new[] { 1.0 })).ShouldThrowAn <FuncParserException>();
 }
Пример #17
0
 public void should_throw_an_exception_indicating_that_the_simulation_should_be_calculated_first()
 {
     The.Action(() => sut.ExportResultsToExcelAsync(_simulation)).ShouldThrowAn <PKSimException>();
 }
 public void should_throw_a_func_parser_exception()
 {
     The.Action(() => sut.Parse()).ShouldThrowAn <FuncParserException>();
 }
Пример #19
0
 public void should_throw_exception_file_not_found_for_getting_preview()
 {
     The.Action(() => sut.GetPreview(_excelFile + "Unknown", 10, A.Fake <Cache <string, Rectangle> >())).ShouldThrowAn <FileNotFoundException>();
 }
 public void should_throw_an_exception()
 {
     The.Action(() => sut.DeserializeFromFile(_tmpFile)).ShouldThrowAn <OSPSuiteException>();
 }
Пример #21
0
 public void should_throw_missing_unit_spec_sheet3()
 {
     The.Action(() => sut.ImportDataTables(_importDataTable, _excelFile, _sheetNames[2], 0, 1, 2, -1, _cms)).
     ShouldThrowAn <DataColumnHasNoUnitInformationException>();
 }
Пример #22
0
 public void should_throw_an_exception()
 {
     The.Action(() => sut.CreateAndOptimizeFor(_originData)).ShouldThrowAn <CannotCreateIndividualWithConstraintsException>();
 }
Пример #23
0
 public void should_throw_exception_invalid_sheet_for_getting_column_names()
 {
     The.Action(() => sut.GetColumnNames(_excelFile, "UnknownSheet", 0)).ShouldThrowAn <OSPSuiteException>();
 }
 public void should_throw_an_exception()
 {
     The.Action(() => sut.ValidateConfigurationFor(_simulation)).ShouldThrowAn <InvalidSimulationConfigurationException>();
 }
Пример #25
0
 public void should_throw_exception_file_not_found_for_fill_data_table()
 {
     The.Action(
         () => sut.ImportDataTables(_importDataTable, _excelFile + "Unknown", _sheetNames[0], 0, 0, 1, -1, _cms)).
     ShouldThrowAn <FileNotFoundException>();
 }
Пример #26
0
 public void should_throw_an_exception()
 {
     The.Action(() => sut.ShowDifferencesBetween(_templateBuildingBlock, _usedBuildingBlock, _simulation)).ShouldThrowAn <PKSimException>();
 }
Пример #27
0
 public void should_throw_ospsuite_exception_for_fill_data_table_data_start_row_too_large()
 {
     The.Action(() => sut.ImportDataTables(_importDataTable, _excelFile, _sheetNames[0], 0, 0, 60, -1, _cms)).
     ShouldThrowAn <OSPSuiteException>();
 }
Пример #28
0
 public void throw_argument_out_of_range_exception()
 {
     The.Action(() => sut.Execute(_executionContext)).ShouldThrowAn <ArgumentOutOfRangeException>();
 }
Пример #29
0
 public void should_throw_an_exception()
 {
     The.Action(() => sut.MapToModel(_snapshot)).ShouldThrowAn <PKSimException>();
 }
 public void should_throw_an_exception_if_no_matching_constructor_was_found()
 {
     The.Action(() => typeof(AssemblyScanner).CreateInstanceUsing(A.Fake <IContainer>(), new AnImplementation()))
     .ShouldThrowAn <MissingConstructorWithParametersException>();
 }