コード例 #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>();
 }
コード例 #11
0
 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>();
 }
コード例 #16
0
 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>();
 }
コード例 #18
0
 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>();
 }
コード例 #20
0
 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>();
 }
コード例 #24
0
 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>();
 }
コード例 #30
0
 public void should_throw_an_exception_if_no_matching_constructor_was_found()
 {
     The.Action(() => typeof(AssemblyScanner).CreateInstanceUsing(A.Fake <IContainer>(), new AnImplementation()))
     .ShouldThrowAn <MissingConstructorWithParametersException>();
 }