From 80eaa213b0faefd9112b0cc4a9ca1cccedc0967b Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Wed, 22 Mar 2017 15:25:48 -0400 Subject: [PATCH 01/50] Fixes #15 code coverage (#18) * WIP #15 - Code coverage using coveralls.io (#17) * adding badge to readme * Update README.md * adding build-scripts * update appveyor.yml * appveyor requires sln name in appveyor.yml * adding rakefile * modify rakefile.rb * reformat appveyor.yml * update build-scripts * update build-scripts * re-initialize coveralls repository * update build-scripts * update build-scripts * remove UI from coverage calculations * move build-scripts to scripts * update scripts * move build-scripts to upstream * remove extra submodule * Add coverage yml file * Fixes 15 code coverage --- .gitmodules | 3 ++ OSPSuite.Core.sln | 1 + README.md | 1 + appveyor-coverage.yml | 43 +++++++++++++++++++++++ appveyor.yml | 8 ++++- rakefile.rb | 1 + scripts | 1 + tests/OSPSuite.Core.Tests/packages.config | 2 ++ 8 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 appveyor-coverage.yml create mode 100644 rakefile.rb create mode 160000 scripts diff --git a/.gitmodules b/.gitmodules index b4e8b8fe2..87834778c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "src/OSPSuite.PKParameters"] path = src/OSPSuite.PKParameters url = https://github.com/Open-Systems-Pharmacology/OSPSuite.PKParameters.git +[submodule "scripts"] + path = scripts + url = https://github.com/Open-Systems-Pharmacology/build-scripts.git diff --git a/OSPSuite.Core.sln b/OSPSuite.Core.sln index b0f982cfa..288200d9c 100644 --- a/OSPSuite.Core.sln +++ b/OSPSuite.Core.sln @@ -8,6 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution appveyor.yml = appveyor.yml copy_to_mobi.bat = copy_to_mobi.bat copy_to_pksim.bat = copy_to_pksim.bat + rakefile.rb = rakefile.rb README.md = README.md SolutionInfo.cs = SolutionInfo.cs EndProjectSection diff --git a/README.md b/README.md index 3619ebadb..2ae1156ba 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Core functionalities of the Open Systems Pharmacology Suite. ## Code Status [![NuGet version](https://img.shields.io/nuget/v/OSPSuite.Core.svg?style=flat)](https://www.nuget.org/packages/OSPSuite.Core) [![Build status](https://ci.appveyor.com/api/projects/status/w3ecxmp3grryc5ts/branch/master?svg=true&passingText=master%20-%20passing)](https://ci.appveyor.com/project/open-systems-pharmacology-ci/ospsuite-core/branch/master) +[![Coverage Status](https://coveralls.io/repos/github/rwmcintosh/OSPSuite.Core/badge.svg?branch=master)](https://coveralls.io/github/rwmcintosh/OSPSuite.Core?branch=master) ## Code of conduct Everyone interacting in the Open Systems Pharmacology community (codebases, issue trackers, chat rooms, mailing lists etc...) is expected to follow the Open Systems Pharmacology [code of conduct](https://github.com/Open-Systems-Pharmacology/Suite/blob/master/CODE_OF_CONDUCT.md). diff --git a/appveyor-coverage.yml b/appveyor-coverage.yml new file mode 100644 index 000000000..75a7d3cdc --- /dev/null +++ b/appveyor-coverage.yml @@ -0,0 +1,43 @@ +configuration: Debug + +environment: + app_version: '7.1.0' + COVERALLS_REPO_TOKEN: + secure: RNtCVakeVmnnxGR4djlmhBbE83cx/t4sqqFkqhQLeHw8uf5n5UT0rvYGdkNseeIi/Ab5+RIITpexnKCP + +version: '%app_version%.{build}' + +assembly_info: + patch: true + file: SolutionInfo.* + assembly_version: "{version}" + assembly_file_version: "{version}" + +cache: + packages -> **\packages.config + +before_build: + - nuget sources add -name bddhelper -source https://ci.appveyor.com/nuget/ospsuite-bddhelper + - nuget sources add -name utility -source https://ci.appveyor.com/nuget/ospsuite-utility + - nuget sources add -name serializer -source https://ci.appveyor.com/nuget/ospsuite-serializer + - nuget sources add -name databinding -source https://ci.appveyor.com/nuget/ospsuite-databinding + - nuget sources add -name texreporting -source https://ci.appveyor.com/nuget/ospsuite-texreporting + - nuget sources add -name databinding-devexpress -source https://ci.appveyor.com/nuget/ospsuite-databinding-devexpress + - nuget sources add -name funcparser -source https://ci.appveyor.com/nuget/ospsuite-funcparser + - nuget sources add -name simmodel -source https://ci.appveyor.com/nuget/ospsuite-simmodel + - nuget sources add -name cvodes -source https://ci.appveyor.com/nuget/ospsuite-simmodel-solver-cvodes-282 + - nuget restore + +build: + verbosity: minimal + project: OSPSuite.Core.sln + +test_script: + - rake cover["+[OSPSuite.Core]* +[OSPSuite.Assets]* +[OSPSuite.Infrastructure]* +[OSPSuite.Presentation]*"] + +install: + - git submodule update --init --recursive + - ps: >- + (new-object net.webclient).DownloadFile('https://download.microsoft.com/download/A/2/D/A2D8587D-0027-4217-9DAD-38AFDB0A177E/msxml.msi', 'C:\\msxml.msi') + + Start-Process msiexec.exe -ArgumentList /i, C:\msxml.msi, /quiet, /qn, /norestart -Wait diff --git a/appveyor.yml b/appveyor.yml index fb68557b4..10658c73c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ assembly_info: patch: true file: SolutionInfo.* assembly_version: "{version}" - assembly_file_version: "{version}" + assembly_file_version: "{version}" cache: packages -> **\packages.config @@ -49,6 +49,12 @@ skip_commits: files: - '*.md' +pull_requests: + do_not_increment_build_number: true + +nuget: + disable_publish_on_pr: true + notifications: - provider: Slack incoming_webhook: diff --git a/rakefile.rb b/rakefile.rb new file mode 100644 index 000000000..1ac4ccf28 --- /dev/null +++ b/rakefile.rb @@ -0,0 +1 @@ +require_relative 'scripts/coverage' diff --git a/scripts b/scripts new file mode 160000 index 000000000..9482f13cd --- /dev/null +++ b/scripts @@ -0,0 +1 @@ +Subproject commit 9482f13cdf895c752e63b88434270395c9aecdea diff --git a/tests/OSPSuite.Core.Tests/packages.config b/tests/OSPSuite.Core.Tests/packages.config index f33f41ace..db37be32a 100644 --- a/tests/OSPSuite.Core.Tests/packages.config +++ b/tests/OSPSuite.Core.Tests/packages.config @@ -2,12 +2,14 @@ + + From 87778174c5b5a54d934c7497db7ff9b7d03ef91c Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Wed, 22 Mar 2017 16:06:58 -0400 Subject: [PATCH 02/50] Update coverage badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ae1156ba..9b937d85b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Core functionalities of the Open Systems Pharmacology Suite. ## Code Status [![NuGet version](https://img.shields.io/nuget/v/OSPSuite.Core.svg?style=flat)](https://www.nuget.org/packages/OSPSuite.Core) [![Build status](https://ci.appveyor.com/api/projects/status/w3ecxmp3grryc5ts/branch/master?svg=true&passingText=master%20-%20passing)](https://ci.appveyor.com/project/open-systems-pharmacology-ci/ospsuite-core/branch/master) -[![Coverage Status](https://coveralls.io/repos/github/rwmcintosh/OSPSuite.Core/badge.svg?branch=master)](https://coveralls.io/github/rwmcintosh/OSPSuite.Core?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/Open-Systems-Pharmacology/OSPSuite.Core/badge.svg?branch=develop)](https://coveralls.io/github/Open-Systems-Pharmacology/OSPSuite.Core?branch=develop) ## Code of conduct Everyone interacting in the Open Systems Pharmacology community (codebases, issue trackers, chat rooms, mailing lists etc...) is expected to follow the Open Systems Pharmacology [code of conduct](https://github.com/Open-Systems-Pharmacology/Suite/blob/master/CODE_OF_CONDUCT.md). From 6c05300f574c382e4c994e3775abd0c73e9ae946 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Wed, 22 Mar 2017 16:10:45 -0400 Subject: [PATCH 03/50] Update coverall token --- appveyor-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor-coverage.yml b/appveyor-coverage.yml index 75a7d3cdc..2d015bf20 100644 --- a/appveyor-coverage.yml +++ b/appveyor-coverage.yml @@ -3,7 +3,7 @@ configuration: Debug environment: app_version: '7.1.0' COVERALLS_REPO_TOKEN: - secure: RNtCVakeVmnnxGR4djlmhBbE83cx/t4sqqFkqhQLeHw8uf5n5UT0rvYGdkNseeIi/Ab5+RIITpexnKCP + secure: RNtCVakeVmnnxGR4djlmhBbE83cx/t4sqqFkqhQLeHw8uf5n5UT0rvYGdkNseeIi version: '%app_version%.{build}' From 87c6faed2b958229db34e136bef68aefa8865dc0 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 23 Mar 2017 11:11:20 -0400 Subject: [PATCH 04/50] Fixes #19 move tests from PKSim into core and optimize some integrationstests (#20) --- .../Core/OptimizationAlgorithmSpecs.cs | 23 ++- .../Helpers/DiagramModelForSpecs.cs | 155 ++++++++++++++++++ .../UnitTestContextSpecificationSpecs.cs | 65 ++++++-- ...AddRelatedItemToJournalPageCommandSpecs.cs | 38 +++++ .../AllJournalDiagramsQuerySpecs.cs | 25 +++ .../AllJournalItemsQuerySpecs.cs | 37 +++++ .../Infrastructure/AllKnownTagsQuerySpecs.cs | 25 +++ .../ContextForJournalDatabase.cs | 58 +++++++ .../CreateWorkingJournalItemCommandSpecs.cs | 46 ++++++ .../DeleteJournalPageCommandSpecs.cs | 68 ++++++++ ...eRelatedItemFromJournalPageCommandSpecs.cs | 32 ++++ .../JournalPageIdsFromSearchQuerySpecs.cs | 105 ++++++++++++ ...tAvailableWorkingJournalIndexQuerySpecs.cs | 27 +++ .../UpdateJournalDiagramCommandSpecs.cs | 28 ++++ .../UpdateJournalPageCommandSpecs.cs | 50 ++++++ .../UpdateJournalPageTagsCommandSpecs.cs | 24 +++ .../OSPSuite.Core.Tests.csproj | 18 ++ 17 files changed, 796 insertions(+), 28 deletions(-) create mode 100644 tests/OSPSuite.Core.Tests/Helpers/DiagramModelForSpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/AddRelatedItemToJournalPageCommandSpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/AllJournalDiagramsQuerySpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/AllJournalItemsQuerySpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/AllKnownTagsQuerySpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/ContextForJournalDatabase.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/CreateWorkingJournalItemCommandSpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/DeleteJournalPageCommandSpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/DeleteRelatedItemFromJournalPageCommandSpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/JournalPageIdsFromSearchQuerySpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/NextAvailableWorkingJournalIndexQuerySpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalDiagramCommandSpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalPageCommandSpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalPageTagsCommandSpecs.cs diff --git a/tests/OSPSuite.Core.Tests/Core/OptimizationAlgorithmSpecs.cs b/tests/OSPSuite.Core.Tests/Core/OptimizationAlgorithmSpecs.cs index 0c8d1c004..d1c1b65be 100644 --- a/tests/OSPSuite.Core.Tests/Core/OptimizationAlgorithmSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Core/OptimizationAlgorithmSpecs.cs @@ -2,13 +2,11 @@ using System.Linq; using OSPSuite.BDDHelper; using OSPSuite.BDDHelper.Extensions; -using OSPSuite.Utility.Exceptions; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Data; using OSPSuite.Core.Domain.ParameterIdentifications; using OSPSuite.Core.Domain.ParameterIdentifications.Algorithms; - -// ReSharper disable InconsistentNaming +using OSPSuite.Utility.Exceptions; namespace OSPSuite.Core { @@ -26,7 +24,7 @@ protected override void Context() protected override void Because() { var constraints = CreateConstraints(); - sut.Optimize(constraints, objectiveFunction); + sut.Optimize(constraints, ObjectiveFunction); } protected virtual IReadOnlyList CreateConstraints() @@ -45,13 +43,13 @@ protected virtual IReadOnlyList CreateConstraints( /// /// /// - protected virtual OptimizationRunResult objectiveFunction(IReadOnlyList values) + protected virtual OptimizationRunResult ObjectiveFunction(IReadOnlyList values) { var residualResult = new ResidualsResult(); var outputResiduals = new OutputResiduals("A|B", new DataRepository(), new[] { - new Residual(0, values[0].Value - 3,1), - new Residual(0, values[1].Value - 4,1) + new Residual(0, values[0].Value - 3, 1), + new Residual(0, values[1].Value - 4, 1) }); residualResult.AddOutputResiduals(outputResiduals); @@ -88,7 +86,7 @@ protected void CheckOptimizedValues() } } - class When_optimizing_using_Monte_carlo : concern_for_OptimizationAlgorithm + public class When_optimizing_using_monte_carlo : concern_for_OptimizationAlgorithm { protected override IOptimizationAlgorithm CreateOptimizationAlgorithm() { @@ -131,6 +129,7 @@ public void should_return_optimal_values() public class When_optimizing_using_MPFit_LM_with_invalid_start_values : concern_for_OptimizationAlgorithm { private OSPSuiteException _exception; + protected override IOptimizationAlgorithm CreateOptimizationAlgorithm() { return new MPFitLevenbergMarquardtOptimizer(); @@ -141,7 +140,7 @@ protected override IReadOnlyList CreateConstraints var constraint1 = new OptimizedParameterConstraint("x[0]", 0, 2, double.PositiveInfinity, Scalings.Linear); var constraint2 = new OptimizedParameterConstraint("x[1]", 0, 10, 1, Scalings.Linear); - return new List() { constraint1, constraint2 }; + return new List() {constraint1, constraint2}; } protected override void Because() @@ -166,14 +165,14 @@ public void should_throw_an_exception() public class When_optimizing_using_MPFit_LM_with_error_in_objective_function : concern_for_OptimizationAlgorithm { private OSPSuiteException _exception; - private string _objectiveFunctionErrorMessage = "Warum ist die Banane krumm?"; + private readonly string _objectiveFunctionErrorMessage = "Warum ist die Banane krumm?"; protected override IOptimizationAlgorithm CreateOptimizationAlgorithm() { return new MPFitLevenbergMarquardtOptimizer(); } - protected override OptimizationRunResult objectiveFunction(IReadOnlyList values) + protected override OptimizationRunResult ObjectiveFunction(IReadOnlyList values) { var residualResult = new ResidualsResult() { @@ -213,7 +212,7 @@ public class When_the_first_initial_run_with_default_start_values_throws_an_exce { private OSPSuiteException _exception; - protected override OptimizationRunResult objectiveFunction(IReadOnlyList values) + protected override OptimizationRunResult ObjectiveFunction(IReadOnlyList values) { return new OptimizationRunResult { diff --git a/tests/OSPSuite.Core.Tests/Helpers/DiagramModelForSpecs.cs b/tests/OSPSuite.Core.Tests/Helpers/DiagramModelForSpecs.cs new file mode 100644 index 000000000..7e3f4510d --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Helpers/DiagramModelForSpecs.cs @@ -0,0 +1,155 @@ +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using OSPSuite.Core.Diagram; + +namespace OSPSuite.Helpers +{ + public class DiagramModelForSpecs : IDiagramModel + { + public PointF Location { get; set; } + public PointF Center { get; set; } + public SizeF Size { get; set; } + public RectangleF Bounds { get; set; } + + public IEnumerable GetDirectChildren() where T : class + { + return Enumerable.Empty(); + } + + public IEnumerable GetAllChildren() where T : class + { + return Enumerable.Empty(); + } + + public void AddChildNode(IBaseNode node) + { + } + + public void RemoveChildNode(IBaseNode node) + { + } + + public bool ContainsChildNode(IBaseNode node, bool recursive) + { + return false; + } + + public RectangleF CalculateBounds() + { + return new RectangleF(0, 0, 10, 10); + } + + public void SetHiddenRecursive(bool hidden) + { + } + + public void PostLayoutStep() + { + } + + public void Collapse(int level) + { + } + + public void Expand(int level) + { + } + + public IBaseNode GetNode(string id) + { + return null; + } + + public T GetNode(string id) where T : class, IBaseNode + { + return null; + } + + public T CreateNode(string id, PointF location, IContainerBase parentContainerBase) where T : class, IBaseNode, new() + { + return new T(); + } + + public void RemoveNode(string id) + { + } + + public void RenameNode(string id, string name) + { + } + + public IDiagramModel CreateCopy(string containerId = null) + { + return new DiagramModelForSpecs(); + } + + public void ReplaceNodeIds(IDictionary changedIds) + { + } + + public bool IsEmpty() + { + return true; + } + + public void Clear() + { + } + + public void SetDefaultExpansion() + { + } + + public void RefreshSize() + { + } + + public void Undo() + { + } + + public void ClearUndoStack() + { + } + + public void BeginUpdate() + { + } + + public void EndUpdate() + { + } + + public bool StartTransaction() + { + return true; + } + + public bool FinishTransaction(string layoutrecursivedone) + { + return true; + } + + public void ShowDefaultExpansion() + { + } + + public IBaseNode FindByName(string name) + { + return null; + } + + public void AddNodeId(IBaseNode baseNode) + { + } + + public bool IsLayouted { get; set; } + public IDiagramOptions DiagramOptions { get; set; } + + public IDiagramModel Create() + { + return new DiagramModelForSpecs(); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs b/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs index 30e396520..1f0159f4f 100644 --- a/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs @@ -4,14 +4,17 @@ using FakeItEasy; using OSPSuite.BDDHelper; using OSPSuite.Core; +using OSPSuite.Core.Commands; using OSPSuite.Core.Converter.v5_2; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Services; using OSPSuite.Core.Domain.UnitSystem; +using OSPSuite.Core.Journal; using OSPSuite.Core.Serialization; using OSPSuite.Core.Serialization.Exchange; using OSPSuite.Core.Serialization.Xml; using OSPSuite.Core.Services; +using OSPSuite.Infrastructure; using OSPSuite.Infrastructure.Container.Castle; using OSPSuite.Presentation.Services; using OSPSuite.Utility.Collections; @@ -27,6 +30,8 @@ public abstract class ContextForIntegration : ContextSpecification { public override void GlobalContext() { + if (IoC.Container != null) return; + base.GlobalContext(); var container = new CastleWindsorContainer(); @@ -34,7 +39,6 @@ public override void GlobalContext() IoC.RegisterImplementationOf(IoC.Container); container.WindsorContainer.AddFacility(); - container.AddRegister(x => x.FromType()); container.Register(LifeStyle.Singleton); container.Register(LifeStyle.Singleton); container.Register(LifeStyle.Singleton); @@ -45,42 +49,71 @@ public override void GlobalContext() container.Register(LifeStyle.Singleton); container.Register(typeof(IRepository<>), typeof(ImplementationRepository<>)); container.RegisterImplementationOf(A.Fake()); + var stringCompression = A.Fake(); A.CallTo(() => stringCompression.Compress(A._)).ReturnsLazily(x=>x.GetArgument(0)); A.CallTo(() => stringCompression.Decompress(A._)).ReturnsLazily(x=>x.GetArgument(0)); - container.RegisterImplementationOf(stringCompression); + container.RegisterImplementationOf(A.Fake()); container.RegisterImplementationOf(A.Fake()); container.RegisterImplementationOf(A.Fake()); + container.RegisterImplementationOf(A.Fake()); + container.RegisterImplementationOf(A.Fake()); + container.RegisterImplementationOf(A.Fake()); + container.RegisterImplementationOf(A.Fake()); + container.RegisterImplementationOf(A.Fake()); + var applicationConfiguration = A.Fake(); A.CallTo(() => applicationConfiguration.Product).Returns(Origins.Other); - IoC.Container.RegisterImplementationOf(applicationConfiguration); + container.RegisterImplementationOf(applicationConfiguration); - var groupRepository = IoC.Resolve(); - var moBiGroup = new Group { Name = Constants.Groups.MOBI, Id="1" }; - var undefinedGroup = new Group { Name = Constants.Groups.UNDEFINED, Id = "0" }; - var solverSettingsGroup = new Group { Name = Constants.Groups.SOLVER_SETTINGS, Id = "2" }; - groupRepository.AddGroup(moBiGroup); - groupRepository.AddGroup(solverSettingsGroup); - groupRepository.AddGroup(undefinedGroup); + initGroupRepository(); var progressMananager = A.Fake(); A.CallTo(() => progressMananager.Create()).Returns(A.Fake()); - IoC.Container.RegisterImplementationOf(progressMananager); + container.RegisterImplementationOf(progressMananager); + + using (container.OptimizeDependencyResolution()) + { + container.AddRegister(x => x.FromType()); + container.AddRegister(x => x.FromType()); + var register = new CoreSerializerRegister(); + container.AddRegister(x => x.FromInstance(register)); + register.PerformMappingForSerializerIn(container); + } + + initializeDimensions(); + + Environment.CurrentDirectory = AppDomain.CurrentDomain.BaseDirectory; + } - var register = new CoreSerializerRegister(); - IoC.Container.AddRegister(x => x.FromInstance(register)); - register.PerformMappingForSerializerIn(IoC.Container); + private static void initGroupRepository() + { + var groupRepository = IoC.Resolve(); + var moBiGroup = new Group {Name = Constants.Groups.MOBI, Id = "1"}; + var undefinedGroup = new Group {Name = Constants.Groups.UNDEFINED, Id = "0"}; + var solverSettingsGroup = new Group {Name = Constants.Groups.SOLVER_SETTINGS, Id = "2"}; + groupRepository.AddGroup(moBiGroup); + groupRepository.AddGroup(solverSettingsGroup); + groupRepository.AddGroup(undefinedGroup); + } + private static void initializeDimensions() + { var dimensionFactory = IoC.Resolve(); - var persistor = IoC.Resolve(); + var persistor = IoC.Resolve(); persistor.Load(dimensionFactory, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "OSPSuite.Dimensions.xml")); dimensionFactory.AddDimension(Constants.Dimension.NO_DIMENSION); var dimensionMapper = IoC.Resolve(); dimensionMapper.DummyDimensionsForConversion.Each(dimensionFactory.AddDimension); + } - Environment.CurrentDirectory = AppDomain.CurrentDomain.BaseDirectory; + public override void GlobalCleanup() + { + base.GlobalCleanup(); + var withIdRepository = IoC.Resolve(); + withIdRepository.Clear(); } } diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/AddRelatedItemToJournalPageCommandSpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/AddRelatedItemToJournalPageCommandSpecs.cs new file mode 100644 index 000000000..7c9a3fc38 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/AddRelatedItemToJournalPageCommandSpecs.cs @@ -0,0 +1,38 @@ +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain; +using OSPSuite.Infrastructure.Journal.Commands; + +namespace OSPSuite.Infrastructure +{ + public class When_adding_a_related_item_to_an_existing_journal_entry : ContextForJournalDatabase + { + [Observation] + public void should_be_able_to_retrieve_the_related_item() + { + var workingJournalItem = _journalPageFactory.Create(); + workingJournalItem.Title = "Test Title"; + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = workingJournalItem }); + + var container = new Core.Domain.Container { Name = "toto" }; + var relatedItem = _relatedItemFactory.Create(container); + relatedItem.Description = "ABC"; + relatedItem.Origin = Origins.PKSim; + relatedItem.Version = "123"; + relatedItem.Discriminator = "SIM"; + relatedItem.FullPath = "FullPath"; + _databaseMediator.ExecuteCommand(new AddRelatedPageToJournalPage { JournalPage = workingJournalItem, RelatedItem = relatedItem }); + + var workingJournalItemFromDb = JournalPageById(workingJournalItem.Id); + workingJournalItemFromDb.RelatedItems.Count.ShouldBeEqualTo(1); + var relatedItemFromDb = workingJournalItemFromDb.RelatedItems[0]; + relatedItemFromDb.IsLoaded.ShouldBeFalse(); + relatedItemFromDb.Name.ShouldBeEqualTo(relatedItem.Name); + relatedItemFromDb.Origin.ShouldBeEqualTo(relatedItem.Origin); + relatedItemFromDb.Description.ShouldBeEqualTo(relatedItem.Description); + relatedItemFromDb.Version.ShouldBeEqualTo(relatedItem.Version); + relatedItemFromDb.Discriminator.ShouldBeEqualTo(relatedItem.Discriminator); + relatedItemFromDb.FullPath.ShouldBeEqualTo(relatedItem.FullPath); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/AllJournalDiagramsQuerySpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/AllJournalDiagramsQuerySpecs.cs new file mode 100644 index 000000000..0dc43f7e9 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/AllJournalDiagramsQuerySpecs.cs @@ -0,0 +1,25 @@ +using System.Linq; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Journal; +using OSPSuite.Helpers; +using OSPSuite.Infrastructure.Journal.Commands; +using OSPSuite.Infrastructure.Journal.Queries; + +namespace OSPSuite.Infrastructure +{ + public class When_retrieving_all_journal_diagram_defined_in_the_database : ContextForJournalDatabase + { + [Observation] + public void should_return_all_available_journal_diagrams() + { + var diagram = new JournalDiagram { Name = "TOTO", DiagramModel = new DiagramModelForSpecs() }; + _databaseMediator.ExecuteCommand(new CreateJournalDiagram { Diagram = diagram }); + + var allWorkingJournalDiagrams = _databaseMediator.ExecuteQuery(new AllJournalDiagrams()); + var diagramFromDb = allWorkingJournalDiagrams.ElementAt(0); + diagramFromDb.Name.ShouldBeEqualTo("TOTO"); + diagramFromDb.DiagramModel.ShouldNotBeNull(); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/AllJournalItemsQuerySpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/AllJournalItemsQuerySpecs.cs new file mode 100644 index 000000000..e2c06b723 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/AllJournalItemsQuerySpecs.cs @@ -0,0 +1,37 @@ +using System.Linq; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain; +using OSPSuite.Infrastructure.Journal.Commands; +using OSPSuite.Infrastructure.Journal.Queries; + +namespace OSPSuite.Infrastructure +{ + public class When_retrieving_all_journal_pages_defined_in_the_database : ContextForJournalDatabase + { + [Observation] + public void should_return_all_available_journal_pages_with_tags_and_related_items() + { + var workingJournalItem = _journalPageFactory.Create(); + workingJournalItem.Title = "Test Title"; + _databaseMediator.ExecuteCommand(new CreateJournalPage {JournalPage = workingJournalItem}); + + workingJournalItem.AddTag("Tag1"); + workingJournalItem.AddTag("Tag2"); + _databaseMediator.ExecuteCommand(new UpdateJournalPage {JournalPage = workingJournalItem}); + + var container = new Core.Domain.Container {Name = "toto"}; + var relatedItem = _relatedItemFactory.Create(container); + relatedItem.Description = "ABC"; + relatedItem.Origin = Origins.PKSim; + relatedItem.Version = "123"; + _databaseMediator.ExecuteCommand(new AddRelatedPageToJournalPage {JournalPage = workingJournalItem, RelatedItem = relatedItem}); + + var allWorkingJournalItems = _databaseMediator.ExecuteQuery(new AllJournalPages()); + var workingJournalItemFromDb = allWorkingJournalItems.ElementAt(0); + workingJournalItemFromDb.Tags.ShouldContain("Tag1", "Tag2"); + workingJournalItemFromDb.RelatedItems.Count.ShouldBeEqualTo(1); + workingJournalItemFromDb.RelatedItems[0].Origin.ShouldBeEqualTo(relatedItem.Origin); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/AllKnownTagsQuerySpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/AllKnownTagsQuerySpecs.cs new file mode 100644 index 000000000..bdd9626a5 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/AllKnownTagsQuerySpecs.cs @@ -0,0 +1,25 @@ +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Infrastructure.Journal.Commands; +using OSPSuite.Infrastructure.Journal.Queries; + +namespace OSPSuite.Infrastructure +{ + public class When_querying_all_available_tags_in_the_database : ContextForJournalDatabase + { + [Observation] + public void should_return_the_expected_tags() + { + var workingJournalItem = _journalPageFactory.Create(); + workingJournalItem.Title = "Test Title"; + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = workingJournalItem }); + + workingJournalItem.AddTag("Tag1"); + workingJournalItem.AddTag("Tag2"); + _databaseMediator.ExecuteCommand(new UpdateJournalPageTags { JournalPage = workingJournalItem }); + + var tags = _databaseMediator.ExecuteQuery(new AllKnownTags()); + tags.ShouldOnlyContain("Tag1", "Tag2"); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/ContextForJournalDatabase.cs b/tests/OSPSuite.Core.Tests/Infrastructure/ContextForJournalDatabase.cs new file mode 100644 index 000000000..aac674529 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/ContextForJournalDatabase.cs @@ -0,0 +1,58 @@ +using System.Text; +using OSPSuite.Core.Journal; +using OSPSuite.Helpers; +using OSPSuite.Infrastructure.Journal; +using OSPSuite.Infrastructure.Journal.Queries; +using OSPSuite.Utility; +using OSPSuite.Utility.Container; + +namespace OSPSuite.Infrastructure +{ + public abstract class ContextForJournalDatabase : ContextForIntegration + { + private string _databaseFile; + protected IJournalPageFactory _journalPageFactory; + protected IContentLoader _contendLoader; + protected IDatabaseMediator _databaseMediator; + protected IJournalSession _journalSession; + protected IRelatedItemFactory _relatedItemFactory; + + public override void GlobalContext() + { + base.GlobalContext(); + _databaseFile = FileHelper.GenerateTemporaryFileName(); + _journalSession = IoC.Resolve(); + _journalPageFactory = IoC.Resolve(); + _contendLoader = IoC.Resolve(); + _databaseMediator = IoC.Resolve(); + _relatedItemFactory = IoC.Resolve(); + _journalSession.Create(_databaseFile); + } + + protected override void Context() + { + } + + public override void GlobalCleanup() + { + base.GlobalCleanup(); + _journalSession.Close(); + FileHelper.DeleteFile(_databaseFile); + } + + protected byte[] StringToBytes(string stringToConvert) + { + return Encoding.UTF8.GetBytes(stringToConvert); + } + + protected string BytesToString(byte[] bytes) + { + return Encoding.UTF8.GetString(bytes); + } + + protected JournalPage JournalPageById(string id) + { + return _databaseMediator.ExecuteQuery(new JournalPageById { Id = id }); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/CreateWorkingJournalItemCommandSpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/CreateWorkingJournalItemCommandSpecs.cs new file mode 100644 index 000000000..468a1e14b --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/CreateWorkingJournalItemCommandSpecs.cs @@ -0,0 +1,46 @@ +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain; +using OSPSuite.Core.Journal; +using OSPSuite.Infrastructure.Journal.Commands; + +namespace OSPSuite.Infrastructure +{ + public class When_creating_a_journal_database_and_saving_some_journal_page_with_content : ContextForJournalDatabase + { + private readonly string _data = "My data converted in bytes"; + private JournalPage _journalPage; + + protected override void Context() + { + _journalPage = _journalPageFactory.Create(); + _journalPage.Title = "Test Title"; + _journalPage.Origin = Origins.Matlab; + _journalPage.Content.Data = StringToBytes(_data); + } + + protected override void Because() + { + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = _journalPage }); + } + + [Observation] + public void should_be_able_to_retrieve_the_content() + { + var workingJournalItemFromDb = JournalPageById(_journalPage.Id); + + workingJournalItemFromDb.CreatedBy.ShouldBeEqualTo(_journalPage.CreatedBy); + _journalPage.UniqueIndex.ShouldBeEqualTo(1); + _journalPage.Origin.ShouldBeEqualTo(Origins.Matlab); + workingJournalItemFromDb.UniqueIndex.ShouldBeEqualTo(_journalPage.UniqueIndex); + + workingJournalItemFromDb.IsLoaded.ShouldBeFalse(); + + _contendLoader.Load(workingJournalItemFromDb); + workingJournalItemFromDb.IsLoaded.ShouldBeTrue(); + var stringContent = BytesToString(workingJournalItemFromDb.Content.Data); + + stringContent.ShouldBeEqualTo(_data); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/DeleteJournalPageCommandSpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/DeleteJournalPageCommandSpecs.cs new file mode 100644 index 000000000..62bba3b61 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/DeleteJournalPageCommandSpecs.cs @@ -0,0 +1,68 @@ +using System.Linq; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain; +using OSPSuite.Core.Journal; +using OSPSuite.Infrastructure.Journal.Commands; + +namespace OSPSuite.Infrastructure +{ + public class When_deleting_an_existing_journal_page_entry : ContextForJournalDatabase + { + [Observation] + public void should_remove_the_content_of_the_journal_and_the_content_of_all_related_items_as_well_as_the_item_itself() + { + var journalPage = _journalPageFactory.Create(); + journalPage.Title = "Test Title"; + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = journalPage }); + + var relatedItem = _relatedItemFactory.Create(new Core.Domain.Container { Name = "toto" }); + relatedItem.Description = "ABC"; + relatedItem.Origin = Origins.PKSim; + relatedItem.Version = "123"; + _databaseMediator.ExecuteCommand(new AddRelatedPageToJournalPage { JournalPage = journalPage, RelatedItem = relatedItem }); + journalPage.AddRelatedItem(relatedItem); + + //One content for working journal item, one for related item + _journalSession.Current.Contents.All().Count().ShouldBeEqualTo(2); + + _databaseMediator.ExecuteCommand(new DeleteJournalPage { JournalPage = journalPage }); + _journalSession.Current.Contents.All().Count().ShouldBeEqualTo(0); + _journalSession.Current.RelatedItems.All().Count().ShouldBeEqualTo(0); + _journalSession.Current.JournalPages.All().Count().ShouldBeEqualTo(0); + } + } + + public class When_deleting_a_journal_page_that_is_the_parent_of_another_journal_page : ContextForJournalDatabase + { + private JournalPage _parentPage; + private JournalPage _childPage; + + protected override void Context() + { + base.Context(); + _childPage = _journalPageFactory.Create(); + _childPage.Title = "Child"; + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = _childPage }); + + _parentPage = _journalPageFactory.Create(); + _parentPage.Title = "Parent"; + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = _parentPage }); + + _childPage.ParentId = _parentPage.Id; + _databaseMediator.ExecuteCommand(new UpdateJournalPage() { JournalPage = _childPage }); + } + + protected override void Because() + { + _databaseMediator.ExecuteCommand(new DeleteJournalPage() { JournalPage = _parentPage }); + } + + [Observation] + public void should_have_remove_the_parent_relation_ship_from_the_child_page() + { + var childPageFromDb = JournalPageById(_childPage.Id); + childPageFromDb.ParentId.ShouldBeNull(); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/DeleteRelatedItemFromJournalPageCommandSpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/DeleteRelatedItemFromJournalPageCommandSpecs.cs new file mode 100644 index 000000000..61f3f8214 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/DeleteRelatedItemFromJournalPageCommandSpecs.cs @@ -0,0 +1,32 @@ +using System.Linq; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain; +using OSPSuite.Infrastructure.Journal.Commands; + +namespace OSPSuite.Infrastructure +{ + public class When_deleting_an_existing_related_item_from_a_journal_page_entry : ContextForJournalDatabase + { + [Observation] + public void should_remove_the_content_of_the_journal_and_the_content_of_all_related_items_as_well_as_the_item_itself() + { + var workingJournalItem = _journalPageFactory.Create(); + workingJournalItem.Title = "Test Title"; + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = workingJournalItem }); + + var container = new Core.Domain.Container { Name = "toto" }; + var relatedItem = _relatedItemFactory.Create(container); + relatedItem.Description = "ABC"; + relatedItem.Origin = Origins.PKSim; + relatedItem.Version = "123"; + _databaseMediator.ExecuteCommand(new AddRelatedPageToJournalPage { JournalPage = workingJournalItem, RelatedItem = relatedItem }); + workingJournalItem.AddRelatedItem(relatedItem); + + _databaseMediator.ExecuteCommand(new DeleteRelatedItemFromJournalPage { RelatedItem = relatedItem }); + _journalSession.Current.Contents.All().Count().ShouldBeEqualTo(1); + _journalSession.Current.RelatedItems.All().Count().ShouldBeEqualTo(0); + _journalSession.Current.JournalPages.All().Count().ShouldBeEqualTo(1); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/JournalPageIdsFromSearchQuerySpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/JournalPageIdsFromSearchQuerySpecs.cs new file mode 100644 index 000000000..a1c9c7724 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/JournalPageIdsFromSearchQuerySpecs.cs @@ -0,0 +1,105 @@ +using System.Collections.Generic; +using System.Linq; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Journal; +using OSPSuite.Infrastructure.Journal.Commands; +using OSPSuite.Infrastructure.Journal.Queries; + +namespace OSPSuite.Infrastructure +{ + public abstract class concern_for_WorkingJournalItemIdsFromSearchQuery : ContextForJournalDatabase + { + protected JournalSearch _search; + protected List _ids; + protected JournalPage _journalItem1; + protected JournalPage _journalItem2; + + protected override void Context() + { + base.Context(); + _search = new JournalSearch(); + _journalItem1 = _journalPageFactory.Create(); + _journalItem1.Title = "Item1"; + _journalItem1.FullText = "A small house full of fun"; + + _journalItem2 = _journalPageFactory.Create(); + _journalItem2.Title = "Item2"; + _journalItem2.FullText = "A big House empty"; + + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = _journalItem1 }); + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = _journalItem2 }); + } + + protected override void Because() + { + _ids = _databaseMediator.ExecuteQuery(new JournalPageIdsFromSearch { Search = _search }).ToList(); + } + } + + public class When_retrieving_all_journal_ids_matching_an_AND_query : concern_for_WorkingJournalItemIdsFromSearchQuery + { + protected override void Context() + { + base.Context(); + _search.MatchAll = true; + _search.Search = "A house full"; + } + + [Observation] + public void should_return_the_expected_ids() + { + _ids.ShouldOnlyContain(_journalItem1.Id); + } + } + + public class When_retrieving_all_journal_ids_matching_a_query_case_sensitive_with_match : concern_for_WorkingJournalItemIdsFromSearchQuery + { + protected override void Context() + { + base.Context(); + _search.MatchAll = true; + _search.Search = "House"; + _search.MatchCase = true; + } + + [Observation] + public void should_return_the_expected_ids() + { + _ids.ShouldOnlyContain(_journalItem2.Id); + } + } + + public class When_retrieving_all_journal_ids_matching_a_query_case_insensitive : concern_for_WorkingJournalItemIdsFromSearchQuery + { + protected override void Context() + { + base.Context(); + _search.MatchAll = true; + _search.Search = "House"; + _search.MatchCase = false; + } + + [Observation] + public void should_return_the_expected_ids() + { + _ids.ShouldOnlyContain(_journalItem1.Id, _journalItem2.Id); + } + } + + public class When_retrieving_all_journal_ids_matching_an_OR_query : concern_for_WorkingJournalItemIdsFromSearchQuery + { + protected override void Context() + { + base.Context(); + _search.MatchAll = false; + _search.Search = "house full"; + } + + [Observation] + public void should_return_the_expected_ids() + { + _ids.ShouldOnlyContain(_journalItem1.Id, _journalItem2.Id); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/NextAvailableWorkingJournalIndexQuerySpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/NextAvailableWorkingJournalIndexQuerySpecs.cs new file mode 100644 index 000000000..c1967e4cd --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/NextAvailableWorkingJournalIndexQuerySpecs.cs @@ -0,0 +1,27 @@ +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Infrastructure.Journal.Commands; +using OSPSuite.Infrastructure.Journal.Queries; + +namespace OSPSuite.Infrastructure +{ + public class When_retrieving_a_new_unique_index : ContextForJournalDatabase + { + protected override void Context() + { + var workingJournalItem = _journalPageFactory.Create(); + workingJournalItem.Title = "Test Title"; + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = workingJournalItem }); + + workingJournalItem = _journalPageFactory.Create(); + workingJournalItem.Title = "Test Title"; + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = workingJournalItem }); + } + + [Observation] + public void should_return_the_next_available_index() + { + _databaseMediator.ExecuteQuery(new NextAvailableJournalPageIndex()).ShouldBeEqualTo(3); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalDiagramCommandSpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalDiagramCommandSpecs.cs new file mode 100644 index 000000000..5c8bbceaa --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalDiagramCommandSpecs.cs @@ -0,0 +1,28 @@ +using System.Linq; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Journal; +using OSPSuite.Helpers; +using OSPSuite.Infrastructure.Journal.Commands; +using OSPSuite.Infrastructure.Journal.Queries; + +namespace OSPSuite.Infrastructure +{ + public class When_upadting_an_existing_journal_in_the_database : ContextForJournalDatabase + { + [Observation] + public void should_return_all_available_journal_diagrams() + { + var diagram = new JournalDiagram {Name = "TOTO", DiagramModel = new DiagramModelForSpecs()}; + _databaseMediator.ExecuteCommand(new CreateJournalDiagram {Diagram = diagram}); + + diagram.Name = "TATA"; + _databaseMediator.ExecuteCommand(new UpdateJournalDiagram {Diagram = diagram}); + + var allWorkingJournalDiagrams = _databaseMediator.ExecuteQuery(new AllJournalDiagrams()); + var diagramFromDb = allWorkingJournalDiagrams.ElementAt(0); + diagramFromDb.Name.ShouldBeEqualTo("TATA"); + diagramFromDb.DiagramModel.ShouldNotBeNull(); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalPageCommandSpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalPageCommandSpecs.cs new file mode 100644 index 000000000..81c62a451 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalPageCommandSpecs.cs @@ -0,0 +1,50 @@ +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain; +using OSPSuite.Core.Journal; +using OSPSuite.Infrastructure.Journal.Commands; + +namespace OSPSuite.Infrastructure +{ + public class When_updating_a_journal_page_entry : ContextForJournalDatabase + { + private JournalPage _journalPage; + private JournalPage _parentJournalPage; + + protected override void Context() + { + base.Context(); + _journalPage = _journalPageFactory.Create(); + _journalPage.Title = "Test Title"; + + _parentJournalPage = _journalPageFactory.Create(); + _parentJournalPage.Title = "ParentTitle"; + + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = _journalPage }); + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = _parentJournalPage }); + + _journalPage.Title = "New Title"; + _journalPage.FullText = "AAAA"; + _journalPage.Origin = Origins.R; + _journalPage.AddTag("Tag1"); + _journalPage.AddTag("Tag2"); + _journalPage.ParentId = _parentJournalPage.Id; + } + + protected override void Because() + { + _databaseMediator.ExecuteCommand(new UpdateJournalPage { JournalPage = _journalPage }); + } + + [Observation] + public void should_be_able_to_retrieve_the_updated_content() + { + var workingJournalItemFromDb = JournalPageById(_journalPage.Id); + workingJournalItemFromDb.Title.ShouldBeEqualTo("New Title"); + workingJournalItemFromDb.OriginId.ShouldBeEqualTo(OriginId.R); + workingJournalItemFromDb.Tags.ShouldContain("Tag1", "Tag2"); + workingJournalItemFromDb.ParentId.ShouldBeEqualTo(_parentJournalPage.Id); + workingJournalItemFromDb.FullText.ShouldBeEqualTo("AAAA"); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalPageTagsCommandSpecs.cs b/tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalPageTagsCommandSpecs.cs new file mode 100644 index 000000000..0f8dbfccc --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Infrastructure/UpdateJournalPageTagsCommandSpecs.cs @@ -0,0 +1,24 @@ +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Infrastructure.Journal.Commands; + +namespace OSPSuite.Infrastructure +{ + public class When_updating_the_tags_of_a_journal_page_entry : ContextForJournalDatabase + { + [Observation] + public void should_be_able_to_retrieve_the_updated_content() + { + var journalPage = _journalPageFactory.Create(); + journalPage.Title = "Test Title"; + _databaseMediator.ExecuteCommand(new CreateJournalPage { JournalPage = journalPage }); + + journalPage.AddTag("Tag1"); + journalPage.AddTag("Tag2"); + _databaseMediator.ExecuteCommand(new UpdateJournalPageTags { JournalPage = journalPage }); + + var journalPageFromDb = JournalPageById(journalPage.Id); + journalPageFromDb.Tags.ShouldOnlyContain("Tag1", "Tag2"); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index ac7f7d596..c6953e7c3 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -166,6 +166,7 @@ + @@ -521,14 +522,27 @@ + + + + + + + + + + + + + @@ -704,6 +718,10 @@ OSPSuite.SimModelSolver_CVODES282.dll PreserveNewest + + SQLite.Interop.dll + PreserveNewest + OSPSuite.Dimensions.xml PreserveNewest From 6b2f25470388bda45b01bd6c6d537831cc9be4ec Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 23 Mar 2017 11:52:19 -0400 Subject: [PATCH 05/50] Fixes #12 format clipboard for github (#21) --- OSPSuite.Core.sln | 1 + appveyor.yml | 1 + .../Services/ExceptionManager.cs | 21 ++++- .../Views/IExceptionView.cs | 4 +- src/OSPSuite.UI/Views/ExceptionView.cs | 22 ++--- .../OSPSuite.Core.Tests.csproj | 1 + .../Presentation/ExceptionManagerSpecs.cs | 90 +++++++++++++++++++ 7 files changed, 121 insertions(+), 19 deletions(-) create mode 100644 tests/OSPSuite.Core.Tests/Presentation/ExceptionManagerSpecs.cs diff --git a/OSPSuite.Core.sln b/OSPSuite.Core.sln index 288200d9c..5e464131a 100644 --- a/OSPSuite.Core.sln +++ b/OSPSuite.Core.sln @@ -5,6 +5,7 @@ VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 14.0.24720.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9ED8AA66-5E2F-4900-846B-4D2758832061}" ProjectSection(SolutionItems) = preProject + appveyor-coverage.yml = appveyor-coverage.yml appveyor.yml = appveyor.yml copy_to_mobi.bat = copy_to_mobi.bat copy_to_pksim.bat = copy_to_pksim.bat diff --git a/appveyor.yml b/appveyor.yml index 10658c73c..9700cd142 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,6 +30,7 @@ build: publish_nuget: true verbosity: minimal include_nuget_references: true + project: OSPSuite.Core.sln skip_branch_with_pr: true diff --git a/src/OSPSuite.Presentation/Services/ExceptionManager.cs b/src/OSPSuite.Presentation/Services/ExceptionManager.cs index f317fb7be..01d5b2f25 100644 --- a/src/OSPSuite.Presentation/Services/ExceptionManager.cs +++ b/src/OSPSuite.Presentation/Services/ExceptionManager.cs @@ -15,13 +15,14 @@ public class ExceptionManager : ExceptionManagerBase { private readonly IDialogCreator _dialogCreator; private readonly IExceptionView _exceptionView; + private readonly string _productInfo; public ExceptionManager(IDialogCreator dialogCreator, IExceptionView exceptionView, IApplicationConfiguration configuration) { _dialogCreator = dialogCreator; _exceptionView = exceptionView; - var productInfo = $"{configuration.ProductNameWithTrademark} {configuration.FullVersion}"; - _exceptionView.Initialize($"{productInfo} - Error", configuration.Icon, productInfo, configuration.IssueTrackerUrl, configuration.ProductName); + _productInfo = $"{configuration.ProductNameWithTrademark} {configuration.FullVersion}"; + _exceptionView.Initialize($"{_productInfo} - Error", configuration.Icon, _productInfo, configuration.IssueTrackerUrl, configuration.ProductName); } public override void LogException(Exception ex) @@ -34,11 +35,23 @@ public override void LogException(Exception ex) } else { - _exceptionView.Display(ex); - this.LogError(ex); + showException(ex); } } + private void showException(Exception ex) + { + var message = ex.FullMessage(); + var stackTrace = ex.FullStackTrace(); + _exceptionView.Display(message, stackTrace, clipboardContentFrom(message, stackTrace)); + this.LogError(ex); + } + + private string clipboardContentFrom(string message, string stackTrace) + { + return $"Application:\n{_productInfo}\n\n{message}\n\nStack trace:\n```\n{stackTrace}\n```"; + } + private static bool isInfoException(Exception ex) { if (ex == null) diff --git a/src/OSPSuite.Presentation/Views/IExceptionView.cs b/src/OSPSuite.Presentation/Views/IExceptionView.cs index 8a0e378fd..a272f9d18 100644 --- a/src/OSPSuite.Presentation/Views/IExceptionView.cs +++ b/src/OSPSuite.Presentation/Views/IExceptionView.cs @@ -26,9 +26,9 @@ public interface IExceptionView string FullStackTrace { set; } /// - /// Displays the view, set the owner form and also sets exception and stack trace bypassing the value sets by the user + /// Displays the view, set the owner form and also sets exception, stack trace and clipboard content /// - void Display(Exception e); + void Display(string message, string stackTrace, string clipboardContent); /// /// Displays the view for the given owner diff --git a/src/OSPSuite.UI/Views/ExceptionView.cs b/src/OSPSuite.UI/Views/ExceptionView.cs index 0fae97dde..048ceda61 100644 --- a/src/OSPSuite.UI/Views/ExceptionView.cs +++ b/src/OSPSuite.UI/Views/ExceptionView.cs @@ -13,8 +13,9 @@ namespace OSPSuite.UI.Views { public partial class ExceptionView : XtraForm, IExceptionView { - private string _assemblyInfo; + private string _productInfo; private string _issueTrackerUrl; + private string _cliboardContent; private const string _couldNotCopyToClipboard = "Unable to copy the information to the clipboard."; public object MainView { private get; set; } @@ -63,7 +64,7 @@ public void Initialize(string caption, ApplicationIcon icon, string productInfo, { Text = caption; Icon = icon; - _assemblyInfo = productInfo; + _productInfo = productInfo; _issueTrackerUrl = issueTrackerUrl; Description = Captions.ExceptionViewDescription(issueTrackerUrl); issueTrackerLink.Text = Captions.IssueTrackerLinkFor(productName); @@ -97,14 +98,10 @@ private void invokeOnSTAThread(ThreadStart method) private void copyToClipboardOnUIThread() { - Clipboard.SetText(fullContent()); - } - - private string fullContent() - { - return $"Application:\n{_assemblyInfo}\n\n{ExceptionMessage}\n\nStack trace:\n{FullStackTrace}"; + Clipboard.SetText(_cliboardContent); } + private void showException(string message) { XtraMessageBox.Show(this, message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -145,13 +142,12 @@ private void showDialogWithOwner() } } - public void Display(Exception exception) + public void Display(string message, string stackTrace, string clipboardContent) { - ExceptionMessage = exception.FullMessage(); - FullStackTrace = exception.FullStackTrace(); + ExceptionMessage = message; + FullStackTrace = stackTrace; + _cliboardContent = clipboardContent; Display(); } - - } } \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index c6953e7c3..e0b3dcbc2 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -592,6 +592,7 @@ + diff --git a/tests/OSPSuite.Core.Tests/Presentation/ExceptionManagerSpecs.cs b/tests/OSPSuite.Core.Tests/Presentation/ExceptionManagerSpecs.cs new file mode 100644 index 000000000..1d4fb35a1 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Presentation/ExceptionManagerSpecs.cs @@ -0,0 +1,90 @@ +using System; +using FakeItEasy; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core; +using OSPSuite.Core.Services; +using OSPSuite.Presentation.Services; +using OSPSuite.Presentation.Views; +using OSPSuite.Utility.Exceptions; +using OSPSuite.Utility.Extensions; + +namespace OSPSuite.Presentation +{ + public abstract class concern_for_ExceptionManager : ContextSpecification + { + protected IDialogCreator _dialogCreator; + protected IExceptionView _exceptionView; + private IApplicationConfiguration _configuration; + + protected override void Context() + { + _dialogCreator = A.Fake(); + _exceptionView = A.Fake(); + _configuration = A.Fake(); + sut = new ExceptionManager(_dialogCreator, _exceptionView, _configuration); + } + } + + public class When_showing_an_osp_suite_exception : concern_for_ExceptionManager + { + private Exception _exceptionToShow; + private Exception _childException; + private string _message; + + protected override void Context() + { + base.Context(); + _childException = new OSPSuiteException("ChildMessageError"); + _exceptionToShow = new OSPSuiteException("ParentMessageError", _childException); + A.CallTo(() => _dialogCreator.MessageBoxInfo(A.Ignored)).Invokes( + x => _message = x.GetArgument(0)); + } + + protected override void Because() + { + sut.LogException(_exceptionToShow); + } + + [Observation] + public void should_leverage_the_dialog_creator_to_display_an_error_message_containg_the_exception_message() + { + _message.Contains("ParentMessageError").ShouldBeTrue(); + _message.Contains("ChildMessageError").ShouldBeTrue(); + } + } + + public class When_show_a_generic_exception : concern_for_ExceptionManager + { + private Exception _exceptionToShow; + private string _message; + private string _stackTrace; + private string _clipboard; + + protected override void Context() + { + base.Context(); + _exceptionToShow = new Exception("Error"); + A.CallTo(() => _exceptionView.Display(A._, A._, A._)) + .Invokes(x => + { + _message = x.GetArgument(0); + _stackTrace = x.GetArgument(1); + _clipboard = x.GetArgument(2); + }); + } + + protected override void Because() + { + sut.LogException(_exceptionToShow); + } + + [Observation] + public void should_leverage_the_exception_view_to_display_an_error_message_containg_the_exception_message() + { + _message.ShouldBeEqualTo(_exceptionToShow.FullMessage()); + _stackTrace.ShouldBeEqualTo(_exceptionToShow.FullStackTrace()); + _clipboard.Contains($"```\n{_exceptionToShow.FullStackTrace()}\n```").ShouldBeTrue(); + } + } +} \ No newline at end of file From 1117942a8163bc37bec97b8e9b277952c3b3a757 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 23 Mar 2017 12:45:00 -0400 Subject: [PATCH 06/50] 22 update coverage integration (#23) * Update command line to remove namespaces that do not need coverage * Update token --- appveyor-coverage.yml | 4 ++-- scripts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor-coverage.yml b/appveyor-coverage.yml index 2d015bf20..9622a233b 100644 --- a/appveyor-coverage.yml +++ b/appveyor-coverage.yml @@ -33,9 +33,9 @@ build: project: OSPSuite.Core.sln test_script: - - rake cover["+[OSPSuite.Core]* +[OSPSuite.Assets]* +[OSPSuite.Infrastructure]* +[OSPSuite.Presentation]*"] + - rake cover["+[OSPSuite.Core]* +[OSPSuite.Assets]* +[OSPSuite.Infrastructure]* +[OSPSuite.Presentation]* -[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Reporting* -[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Serialization.ORM* -[OSPSuite.Presentation]OSPSuite.Presentation.MenuAndBars -[OSPSuite.Presentation]OSPSuite.Presentation.Presenters.ContextMenus",OSPSuite.Core.Tests.csproj] -install: +install: - git submodule update --init --recursive - ps: >- (new-object net.webclient).DownloadFile('https://download.microsoft.com/download/A/2/D/A2D8587D-0027-4217-9DAD-38AFDB0A177E/msxml.msi', 'C:\\msxml.msi') diff --git a/scripts b/scripts index 9482f13cd..f18c68d73 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 9482f13cdf895c752e63b88434270395c9aecdea +Subproject commit f18c68d7339bda7af808abd4a60990e3856a00f5 From 1ab7b37d9307c9311081c79dd4346ba93f1b2785 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 23 Mar 2017 13:00:06 -0400 Subject: [PATCH 07/50] Update ruby (#24) --- appveyor-coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor-coverage.yml b/appveyor-coverage.yml index 9622a233b..c128f2eed 100644 --- a/appveyor-coverage.yml +++ b/appveyor-coverage.yml @@ -36,6 +36,7 @@ test_script: - rake cover["+[OSPSuite.Core]* +[OSPSuite.Assets]* +[OSPSuite.Infrastructure]* +[OSPSuite.Presentation]* -[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Reporting* -[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Serialization.ORM* -[OSPSuite.Presentation]OSPSuite.Presentation.MenuAndBars -[OSPSuite.Presentation]OSPSuite.Presentation.Presenters.ContextMenus",OSPSuite.Core.Tests.csproj] install: + - set PATH=C:\Ruby22\bin;%PATH% - git submodule update --init --recursive - ps: >- (new-object net.webclient).DownloadFile('https://download.microsoft.com/download/A/2/D/A2D8587D-0027-4217-9DAD-38AFDB0A177E/msxml.msi', 'C:\\msxml.msi') From 94efa1c32a74ba468f8aa2ca3e4536c4a1788d2a Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Fri, 24 Mar 2017 09:05:17 -0400 Subject: [PATCH 08/50] Update README.md Use develop for appveyor badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b937d85b..600646c72 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Core functionalities of the Open Systems Pharmacology Suite. ## Code Status [![NuGet version](https://img.shields.io/nuget/v/OSPSuite.Core.svg?style=flat)](https://www.nuget.org/packages/OSPSuite.Core) -[![Build status](https://ci.appveyor.com/api/projects/status/w3ecxmp3grryc5ts/branch/master?svg=true&passingText=master%20-%20passing)](https://ci.appveyor.com/project/open-systems-pharmacology-ci/ospsuite-core/branch/master) +[![Build status](https://ci.appveyor.com/api/projects/status/w3ecxmp3grryc5ts/branch/develop?svg=true)](https://ci.appveyor.com/project/open-systems-pharmacology-ci/ospsuite-core/branch/develop) [![Coverage Status](https://coveralls.io/repos/github/Open-Systems-Pharmacology/OSPSuite.Core/badge.svg?branch=develop)](https://coveralls.io/github/Open-Systems-Pharmacology/OSPSuite.Core?branch=develop) ## Code of conduct From 01ee7f824add85be886dd2eea528b60dbc3e9fd2 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Fri, 24 Mar 2017 14:59:09 -0400 Subject: [PATCH 09/50] Fixes #25 use rake for copy scripts instead of batch (#26) --- copy_to_mobi.bat | 9 ++------- copy_to_pksim.bat | 9 ++------- rakefile.rb | 31 +++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 14 deletions(-) diff --git a/copy_to_mobi.bat b/copy_to_mobi.bat index 6c0b30bfe..0d2409151 100644 --- a/copy_to_mobi.bat +++ b/copy_to_mobi.bat @@ -1,9 +1,4 @@ @echo off - -set SolutionDir=%~d0%~p0 -set SrcDir=%SolutionDir%src\ -set AppDebugDir=%SolutionDir%..\MoBi\src\MoBi\bin\Debug\ - -copy "%SrcDir%OSPSuite.UI\bin\debug\OSPSuite*.dll" "%AppDebugDir%" -copy "%SrcDir%OSPSuite.UI\bin\debug\OSPSuite*.pdb" "%AppDebugDir%" +cls +rake copy_to_mobi pause \ No newline at end of file diff --git a/copy_to_pksim.bat b/copy_to_pksim.bat index 00178f625..25e0684c0 100644 --- a/copy_to_pksim.bat +++ b/copy_to_pksim.bat @@ -1,9 +1,4 @@ @echo off - -set SolutionDir=%~d0%~p0 -set SrcDir=%SolutionDir%src\ -set AppDebugDir=%SolutionDir%..\PK-Sim\src\PKSim\bin\Debug - -copy "%SrcDir%OSPSuite.UI\bin\debug\OSPSuite*.dll" "%AppDebugDir%" -copy "%SrcDir%OSPSuite.UI\bin\debug\OSPSuite*.pdb" "%AppDebugDir%" +cls +rake copy_to_pksim pause \ No newline at end of file diff --git a/rakefile.rb b/rakefile.rb index 1ac4ccf28..ad028b00d 100644 --- a/rakefile.rb +++ b/rakefile.rb @@ -1 +1,32 @@ require_relative 'scripts/coverage' +require_relative 'scripts/copy-dependencies' + +task :copy_to_pksim do + copy_to_app '../PK-Sim/src/PKSim/bin/Debug/' +end + +task :copy_to_mobi do + copy_to_app '../MoBi/src/MoBi/bin/Debug/' +end + +private + +def copy_to_app(app_target_relative_path) + app_target_path = File.join(solution_dir, app_target_relative_path) + source_dir = File.join(src_dir, 'OSPSuite.UI', 'bin', 'Debug') + + copy_depdencies source_dir, app_target_path do + copy_file 'OSPSuite.*.dll' + copy_file 'OSPSuite.*.pdb' + end + +end + +def solution_dir + File.dirname(__FILE__) +end + +def src_dir + File.join(solution_dir, 'src') +end + \ No newline at end of file From ab88a3c1a01c44d761269eeb198e69fe170f56fe Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Fri, 24 Mar 2017 15:12:24 -0400 Subject: [PATCH 10/50] Only enable build for master and develop for now --- appveyor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 9700cd142..2f555db53 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,6 +34,11 @@ build: skip_branch_with_pr: true +branches: + only: + - master + - develop + test: assemblies: - OSPSuite.Core.Tests.dll From 320368f7e6fd6608e6922c3c73fbe0624891d1b7 Mon Sep 17 00:00:00 2001 From: Robert McIntosh Date: Mon, 27 Mar 2017 15:34:50 -0400 Subject: [PATCH 11/50] Fixes #27 - Change coverage service to codecov.io (#28) --- README.md | 2 +- appveyor-coverage.yml | 7 +++---- rakefile.rb | 15 +++++++++++++++ scripts | 2 +- tests/OSPSuite.Core.Tests/packages.config | 1 - 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 600646c72..ce75cfc43 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Core functionalities of the Open Systems Pharmacology Suite. ## Code Status [![NuGet version](https://img.shields.io/nuget/v/OSPSuite.Core.svg?style=flat)](https://www.nuget.org/packages/OSPSuite.Core) [![Build status](https://ci.appveyor.com/api/projects/status/w3ecxmp3grryc5ts/branch/develop?svg=true)](https://ci.appveyor.com/project/open-systems-pharmacology-ci/ospsuite-core/branch/develop) -[![Coverage Status](https://coveralls.io/repos/github/Open-Systems-Pharmacology/OSPSuite.Core/badge.svg?branch=develop)](https://coveralls.io/github/Open-Systems-Pharmacology/OSPSuite.Core?branch=develop) +[![Coverage status](https://codecov.io/gh/Open-Systems-Pharmacology/OSPSuite.Core/branch/develop/graph/badge.svg)](https://codecov.io/gh/Open-Systems-Pharmacology/OSPSuite.Core) ## Code of conduct Everyone interacting in the Open Systems Pharmacology community (codebases, issue trackers, chat rooms, mailing lists etc...) is expected to follow the Open Systems Pharmacology [code of conduct](https://github.com/Open-Systems-Pharmacology/Suite/blob/master/CODE_OF_CONDUCT.md). diff --git a/appveyor-coverage.yml b/appveyor-coverage.yml index c128f2eed..c21e4c04b 100644 --- a/appveyor-coverage.yml +++ b/appveyor-coverage.yml @@ -2,8 +2,6 @@ configuration: Debug environment: app_version: '7.1.0' - COVERALLS_REPO_TOKEN: - secure: RNtCVakeVmnnxGR4djlmhBbE83cx/t4sqqFkqhQLeHw8uf5n5UT0rvYGdkNseeIi version: '%app_version%.{build}' @@ -33,10 +31,11 @@ build: project: OSPSuite.Core.sln test_script: - - rake cover["+[OSPSuite.Core]* +[OSPSuite.Assets]* +[OSPSuite.Infrastructure]* +[OSPSuite.Presentation]* -[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Reporting* -[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Serialization.ORM* -[OSPSuite.Presentation]OSPSuite.Presentation.MenuAndBars -[OSPSuite.Presentation]OSPSuite.Presentation.Presenters.ContextMenus",OSPSuite.Core.Tests.csproj] + - rake cover install: - - set PATH=C:\Ruby22\bin;%PATH% + - set PATH=C:\Ruby22\bin;C:\\Python34;C:\\Python34\\Scripts;%PATH%" + - pip install codecov - git submodule update --init --recursive - ps: >- (new-object net.webclient).DownloadFile('https://download.microsoft.com/download/A/2/D/A2D8587D-0027-4217-9DAD-38AFDB0A177E/msxml.msi', 'C:\\msxml.msi') diff --git a/rakefile.rb b/rakefile.rb index ad028b00d..9e647c737 100644 --- a/rakefile.rb +++ b/rakefile.rb @@ -1,6 +1,21 @@ require_relative 'scripts/coverage' require_relative 'scripts/copy-dependencies' +task :cover do + filter = [] + filter << "+[OSPSuite.Core]*" + filter << "+[OSPSuite.Infrastructure]*" + filter << "+[OSPSuite.Presentation]*" + + #exclude namespaces that are tested from applications + filter << "-[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Reporting*" + filter << "-[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Serialization.ORM*" + filter << "-[OSPSuite.Presentation]OSPSuite.Presentation.MenuAndBars" + filter << "-[OSPSuite.Presentation]OSPSuite.Presentation.Presenters.ContextMenus" + + Coverage.cover(filter, "OSPSuite.Core.Tests.csproj") +end + task :copy_to_pksim do copy_to_app '../PK-Sim/src/PKSim/bin/Debug/' end diff --git a/scripts b/scripts index f18c68d73..1f7603305 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit f18c68d7339bda7af808abd4a60990e3856a00f5 +Subproject commit 1f760330518b4d74f79a123b42d646aa7686854f diff --git a/tests/OSPSuite.Core.Tests/packages.config b/tests/OSPSuite.Core.Tests/packages.config index db37be32a..dc77ee8ac 100644 --- a/tests/OSPSuite.Core.Tests/packages.config +++ b/tests/OSPSuite.Core.Tests/packages.config @@ -2,7 +2,6 @@ - From cc96d45701a72d35f29536dfb4bd5859691fd4ae Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Mon, 27 Mar 2017 15:37:27 -0400 Subject: [PATCH 12/50] Fixes #29 register context menu with dedicated convention (#30) --- .../OSPSuite.Presentation.csproj | 1 + .../PresentationRegister.cs | 33 +++++++++++++------ .../ContextMenuRegistrationConvention.cs | 20 +++++++++++ 3 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 src/OSPSuite.Presentation/Presenters/ContextMenus/ContextMenuRegistrationConvention.cs diff --git a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj index dfba0ccb7..e0bf62bed 100644 --- a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj +++ b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj @@ -126,6 +126,7 @@ + diff --git a/src/OSPSuite.Presentation/PresentationRegister.cs b/src/OSPSuite.Presentation/PresentationRegister.cs index 325293970..b32882c9e 100644 --- a/src/OSPSuite.Presentation/PresentationRegister.cs +++ b/src/OSPSuite.Presentation/PresentationRegister.cs @@ -55,17 +55,10 @@ public override void RegisterInContainer(IContainer container) scan.ExcludeType(); }); - container.AddScanner(scan => - { - scan.AssemblyContainingType(); - //Commands - scan.IncludeNamespaceContainingType(); - - //Context Menus - scan.IncludeNamespaceContainingType(); - scan.WithConvention(new ConcreteTypeRegistrationConvention()); - }); + registerUICommands(container); + registerContextMenus(container); + registerSingleStartPresenters(container); //OPEN TYPES @@ -86,6 +79,26 @@ public override void RegisterInContainer(IContainer container) container.Register(); } + private static void registerContextMenus(IContainer container) + { + container.AddScanner(scan => + { + scan.AssemblyContainingType(); + scan.IncludeNamespaceContainingType(); + scan.WithConvention(); + }); + } + + private static void registerUICommands(IContainer container) + { + container.AddScanner(scan => + { + scan.AssemblyContainingType(); + scan.IncludeNamespaceContainingType(); + scan.WithConvention(); + }); + } + private static void registerSingleStartPresenters(IContainer container) { container.AddScanner(scan => diff --git a/src/OSPSuite.Presentation/Presenters/ContextMenus/ContextMenuRegistrationConvention.cs b/src/OSPSuite.Presentation/Presenters/ContextMenus/ContextMenuRegistrationConvention.cs new file mode 100644 index 000000000..df57e34f9 --- /dev/null +++ b/src/OSPSuite.Presentation/Presenters/ContextMenus/ContextMenuRegistrationConvention.cs @@ -0,0 +1,20 @@ +using System; +using System.Linq; +using OSPSuite.Utility.Container; +using OSPSuite.Utility.Container.Conventions; + +namespace OSPSuite.Presentation.Presenters.ContextMenus +{ + public class ContextMenuRegistrationConvention : IRegistrationConvention + { + public void Process(Type concreteType, IContainer container, LifeStyle lifeStyle) + { + var allInterfaces = concreteType.GetInterfaces() + .Where(x => x.IsInterface) + .ToList(); + + allInterfaces.Add(concreteType); + container.Register(allInterfaces, concreteType, lifeStyle); + } + } +} \ No newline at end of file From da1b93a1653f098f1610c10afc6cee30e9d36659 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Mon, 27 Mar 2017 16:36:08 -0400 Subject: [PATCH 13/50] Fixes #31 remove duplicate registration (#32) --- scripts | 2 +- .../OSPSuite.Presentation.csproj | 1 - .../PresentationRegister.cs | 2 +- .../ContextMenuRegistrationConvention.cs | 20 ------------------- 4 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 src/OSPSuite.Presentation/Presenters/ContextMenus/ContextMenuRegistrationConvention.cs diff --git a/scripts b/scripts index 1f7603305..f18c68d73 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 1f760330518b4d74f79a123b42d646aa7686854f +Subproject commit f18c68d7339bda7af808abd4a60990e3856a00f5 diff --git a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj index e0bf62bed..dfba0ccb7 100644 --- a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj +++ b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj @@ -126,7 +126,6 @@ - diff --git a/src/OSPSuite.Presentation/PresentationRegister.cs b/src/OSPSuite.Presentation/PresentationRegister.cs index b32882c9e..79864e8c8 100644 --- a/src/OSPSuite.Presentation/PresentationRegister.cs +++ b/src/OSPSuite.Presentation/PresentationRegister.cs @@ -85,7 +85,7 @@ private static void registerContextMenus(IContainer container) { scan.AssemblyContainingType(); scan.IncludeNamespaceContainingType(); - scan.WithConvention(); + scan.WithConvention(); }); } diff --git a/src/OSPSuite.Presentation/Presenters/ContextMenus/ContextMenuRegistrationConvention.cs b/src/OSPSuite.Presentation/Presenters/ContextMenus/ContextMenuRegistrationConvention.cs deleted file mode 100644 index df57e34f9..000000000 --- a/src/OSPSuite.Presentation/Presenters/ContextMenus/ContextMenuRegistrationConvention.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Linq; -using OSPSuite.Utility.Container; -using OSPSuite.Utility.Container.Conventions; - -namespace OSPSuite.Presentation.Presenters.ContextMenus -{ - public class ContextMenuRegistrationConvention : IRegistrationConvention - { - public void Process(Type concreteType, IContainer container, LifeStyle lifeStyle) - { - var allInterfaces = concreteType.GetInterfaces() - .Where(x => x.IsInterface) - .ToList(); - - allInterfaces.Add(concreteType); - container.Register(allInterfaces, concreteType, lifeStyle); - } - } -} \ No newline at end of file From 8ae6bc26beb35f662b6e71efdc09c8aaa089b0cf Mon Sep 17 00:00:00 2001 From: Robert McIntosh Date: Mon, 27 Mar 2017 19:09:10 -0400 Subject: [PATCH 14/50] Fixes #27 - Change coverage service to codecov.io (#33) --- scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts b/scripts index f18c68d73..1f7603305 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit f18c68d7339bda7af808abd4a60990e3856a00f5 +Subproject commit 1f760330518b4d74f79a123b42d646aa7686854f From b8bcbc5223e88541c0c1339f33a92207e1adb0a6 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Wed, 29 Mar 2017 09:56:09 -0400 Subject: [PATCH 15/50] Fixes #34 move some tests from PKSim to Core (#35) --- rakefile.rb | 4 +- scripts | 2 +- .../Domain/ClassifiableObservedData.cs | 5 +- .../Helpers/ClassifiableSimulation.cs | 11 + .../Helpers/DomainHelperForSpecs.cs | 2 + .../Helpers/SimulationNode.cs | 11 + tests/OSPSuite.Core.Tests/Helpers/TestNode.cs | 14 +- .../OSPSuite.Core.Tests.csproj | 5 + .../ClassificationPresenterSpecs.cs | 599 ++++++++++++++++++ .../Presentation/ObjectBaseNodeSpecs.cs | 90 +++ .../Presentation/SubPresenterItemSpecs.cs | 40 ++ 11 files changed, 766 insertions(+), 17 deletions(-) create mode 100644 tests/OSPSuite.Core.Tests/Helpers/ClassifiableSimulation.cs create mode 100644 tests/OSPSuite.Core.Tests/Helpers/SimulationNode.cs create mode 100644 tests/OSPSuite.Core.Tests/Presentation/ClassificationPresenterSpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Presentation/ObjectBaseNodeSpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Presentation/SubPresenterItemSpecs.cs diff --git a/rakefile.rb b/rakefile.rb index 9e647c737..942e02ae5 100644 --- a/rakefile.rb +++ b/rakefile.rb @@ -10,8 +10,8 @@ #exclude namespaces that are tested from applications filter << "-[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Reporting*" filter << "-[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Serialization.ORM*" - filter << "-[OSPSuite.Presentation]OSPSuite.Presentation.MenuAndBars" - filter << "-[OSPSuite.Presentation]OSPSuite.Presentation.Presenters.ContextMenus" + filter << "-[OSPSuite.Presentation]OSPSuite.Presentation.MenuAndBars*" + filter << "-[OSPSuite.Presentation]OSPSuite.Presentation.Presenters.ContextMenus*" Coverage.cover(filter, "OSPSuite.Core.Tests.csproj") end diff --git a/scripts b/scripts index 1f7603305..f18c68d73 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 1f760330518b4d74f79a123b42d646aa7686854f +Subproject commit f18c68d7339bda7af808abd4a60990e3856a00f5 diff --git a/src/OSPSuite.Core/Domain/ClassifiableObservedData.cs b/src/OSPSuite.Core/Domain/ClassifiableObservedData.cs index 91f95b35c..8a94fc006 100644 --- a/src/OSPSuite.Core/Domain/ClassifiableObservedData.cs +++ b/src/OSPSuite.Core/Domain/ClassifiableObservedData.cs @@ -19,9 +19,6 @@ public string ExtendedPropertyValueFor(string propertyName) return Subject.ExtendedPropertyValueFor(propertyName); } - public DataRepository Repository - { - get { return Subject; } - } + public DataRepository Repository => Subject; } } \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Helpers/ClassifiableSimulation.cs b/tests/OSPSuite.Core.Tests/Helpers/ClassifiableSimulation.cs new file mode 100644 index 000000000..2a06f2430 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Helpers/ClassifiableSimulation.cs @@ -0,0 +1,11 @@ +using OSPSuite.Core.Domain; + +namespace OSPSuite.Helpers +{ + public class ClassifiableSimulation : Classifiable + { + public ClassifiableSimulation() : base(ClassificationType.Simulation) + { + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Helpers/DomainHelperForSpecs.cs b/tests/OSPSuite.Core.Tests/Helpers/DomainHelperForSpecs.cs index 507292014..5745af481 100644 --- a/tests/OSPSuite.Core.Tests/Helpers/DomainHelperForSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Helpers/DomainHelperForSpecs.cs @@ -185,4 +185,6 @@ public PathCacheForSpecs() : base(new EntityPathResolverForSpecs()) { } } + + } \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Helpers/SimulationNode.cs b/tests/OSPSuite.Core.Tests/Helpers/SimulationNode.cs new file mode 100644 index 000000000..1577844a2 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Helpers/SimulationNode.cs @@ -0,0 +1,11 @@ +using OSPSuite.Presentation.Presenters.Nodes; + +namespace OSPSuite.Helpers +{ + public class SimulationNode : ObjectWithIdAndNameNode + { + public SimulationNode(ClassifiableSimulation tag) : base(tag) + { + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Helpers/TestNode.cs b/tests/OSPSuite.Core.Tests/Helpers/TestNode.cs index 58af6ee8b..ed6ceed72 100644 --- a/tests/OSPSuite.Core.Tests/Helpers/TestNode.cs +++ b/tests/OSPSuite.Core.Tests/Helpers/TestNode.cs @@ -5,10 +5,9 @@ namespace OSPSuite.Helpers { public class TestNode : AbstractNode { - private readonly string _id; private readonly string _name; - public TestNode():this(string.Empty) + public TestNode() : this(string.Empty) { } @@ -17,18 +16,13 @@ public TestNode(string name) { } - public TestNode(string id, string name):base(id) + public TestNode(string id, string name) : base(id) { - _id = id; + Id = id; _name = name; Text = _name; } - public override string Id - { - get { return _id; } - } - - + public override string Id { get; } } } \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index e0b3dcbc2..68d06d1ca 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -166,7 +166,9 @@ + + @@ -559,6 +561,7 @@ + @@ -624,6 +627,7 @@ + @@ -690,6 +694,7 @@ + diff --git a/tests/OSPSuite.Core.Tests/Presentation/ClassificationPresenterSpecs.cs b/tests/OSPSuite.Core.Tests/Presentation/ClassificationPresenterSpecs.cs new file mode 100644 index 000000000..aed9c5889 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Presentation/ClassificationPresenterSpecs.cs @@ -0,0 +1,599 @@ +using System.Linq; +using FakeItEasy; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain; +using OSPSuite.Core.Domain.Data; +using OSPSuite.Core.Domain.Services; +using OSPSuite.Helpers; +using OSPSuite.Presentation.Core; +using OSPSuite.Presentation.Mappers; +using OSPSuite.Presentation.Nodes; +using OSPSuite.Presentation.Presenters; +using OSPSuite.Presentation.Presenters.Classifications; +using OSPSuite.Presentation.Presenters.Nodes; +using OSPSuite.Utility.Collections; +using OSPSuite.Utility.Extensions; + +namespace OSPSuite.Presentation +{ + public abstract class concern_for_ClassificationPresenter : ContextSpecification + { + protected IClassificationTypeToRootNodeTypeMapper _rootNodeTypeMapper; + private IProjectRetriever _projectRetriever; + protected IExplorerPresenter _explorerPresenter; + protected IApplicationController _applicationController; + protected IProject _project; + protected RootNode _simulationFolderNode; + protected RootNode _observedDataFolderNode; + + protected Cache> _classificationNodesCache; + + protected override void Context() + { + _rootNodeTypeMapper = A.Fake(); + _projectRetriever = A.Fake(); + _applicationController = A.Fake(); + _project = new TestProject(); + _classificationNodesCache = new Cache>(x => x.Tag, x => null); + + A.CallTo(() => _projectRetriever.CurrentProject).Returns(_project); + sut = new ClassificationPresenter(_rootNodeTypeMapper, _applicationController, _projectRetriever); + + _explorerPresenter = A.Fake(); + sut.InitializeWith(_explorerPresenter); + + _simulationFolderNode = createRootNode(RootNodeTypes.SimulationFolder, ClassificationType.Simulation); + _observedDataFolderNode = createRootNode(RootNodeTypes.ObservedDataFolder, ClassificationType.ObservedData); + + A.CallTo(() => _explorerPresenter.AddNode(A._)) + .Invokes(x => + { + var classificationNode = x.GetArgument(0) as ITreeNode; + if (classificationNode != null) + addToCache(classificationNode); + }); + + A.CallTo(() => _explorerPresenter.RemoveNode(A._)) + .Invokes(x => + { + var classificationNode = x.GetArgument(0) as ITreeNode; + if (classificationNode != null) + removeFromCache(classificationNode); + }); + } + + private void removeFromCache(ITreeNode classificationNode) + { + if (_classificationNodesCache.Contains(classificationNode.Tag)) + _classificationNodesCache.Remove(classificationNode.Tag); + } + + private void addToCache(ITreeNode classificationNode) + { + if (!_classificationNodesCache.Contains(classificationNode.Tag)) + _classificationNodesCache.Add(classificationNode); + } + + private RootNode createRootNode(RootNodeType rootNodeType, ClassificationType classificationType) + { + var node = new RootNode(rootNodeType); + A.CallTo(() => _rootNodeTypeMapper.MapFrom(classificationType)).Returns(rootNodeType); + A.CallTo(() => _explorerPresenter.NodeByType(rootNodeType)).Returns(node); + return node; + } + } + + public class When_the_presenter_is_asked_to_remove_classification_node : concern_for_ClassificationPresenter + { + protected ITreeNode _parentNode; + + protected override void Context() + { + base.Context(); + var root = new Classification(); + var rootNode = new ClassificationNode(root); + var parent = new Classification(); + _parentNode = A.Fake>(); + A.CallTo(() => _parentNode.Tag).Returns(parent); + + _parentNode.Under(rootNode); + } + + protected override void Because() + { + sut.RemoveClassification(_parentNode); + } + + [Observation] + public void the_node_should_be_cleared_from_the_view() + { + A.CallTo(() => _explorerPresenter.RemoveNode(A.Ignored)).MustHaveHappened(); + } + + [Observation] + public void the_node_should_be_removed() + { + A.CallTo(() => _parentNode.Delete()).MustHaveHappened(); + } + } + + public class When_the_classification_presenter_is_creating_a_classification_node_for_a_given_classification : concern_for_ClassificationPresenter + { + private IClassification _classification; + private IClassification _parent; + + protected override void Context() + { + base.Context(); + _parent = new Classification { ClassificationType = ClassificationType.ObservedData } + .WithId("parent").WithName("parent"); + + _classification = new Classification { ClassificationType = ClassificationType.ObservedData } + .WithId("child").WithName("child"); + + _classification.Parent = _parent; + } + + protected override void Because() + { + sut.AddClassificationsToTree(new[] { _parent, _classification }); + } + + [Observation] + public void should_create_a_node_for_each_classification_in_the_hiearchy() + { + var node = _classificationNodesCache[_classification]; + var parentNode = node.ParentNode.DowncastTo>(); + node.ShouldNotBeNull(); + node.Tag.ShouldBeEqualTo(_classification); + node.RootNode.ShouldBeEqualTo(_observedDataFolderNode); + parentNode.Tag.ShouldBeEqualTo(_parent); + } + } + + public class When_creating_a_classification_folder : concern_for_ClassificationPresenter + { + private INameClassificationPresenter _presenter; + private ITreeNode _parentClassificationNode; + private IClassification _parentClassification; + + protected override void Context() + { + base.Context(); + _presenter = A.Fake(); + A.CallTo(() => _applicationController.Start()).Returns(_presenter); + //required to use this unspecific CallTo because of an issue with enum type + A.CallTo(_presenter).WithReturnType().Returns(true); + A.CallTo(() => _presenter.Name).Returns("CLASS"); + _parentClassification = new Classification { ClassificationType = ClassificationType.Simulation }; + _project.AddClassification(_parentClassification); + _parentClassificationNode = new ClassificationNode(_parentClassification); + A.CallTo(() => _explorerPresenter.NodeFor(A._)).Returns(null); + } + + protected override void Because() + { + sut.CreateClassificationFolderUnder(_parentClassificationNode); + } + + [Observation] + public void should_ask_the_user_to_enter_a_new_name_for_the_classification_and_the_returned_node_should_represent_the_classificaiton_node() + { + var newClassification = _project.AllClassificationsByType(ClassificationType.Simulation).FindByName("CLASS"); + newClassification.ShouldNotBeNull(); + newClassification.Parent.ShouldBeEqualTo(_parentClassification); + } + } + + public class When_renaning_a_classifiaction : concern_for_ClassificationPresenter + { + private ITreeNode _classificationNode; + private IClassification _classification; + private IRenameClassificationPresenter _presenter; + + protected override void Context() + { + base.Context(); + _classificationNode = A.Fake>(); + _classification = A.Fake().WithName("OLD_NAME"); + _presenter = A.Fake(); + A.CallTo(() => _classificationNode.Tag).Returns(_classification); + A.CallTo(() => _applicationController.Start()).Returns(_presenter); + A.CallTo(() => _presenter.Rename(_classification)).Returns(true); + A.CallTo(() => _presenter.Name).Returns("NEW_NAME"); + } + + protected override void Because() + { + sut.RenameClassification(_classificationNode); + } + + [Observation] + public void should_ask_the_user_to_enter_a_new_name_for_the_classification() + { + A.CallTo(() => _presenter.Rename(_classification)).MustHaveHappened(); + } + + [Observation] + public void should_have_renamed_the_classification() + { + _classification.Name.ShouldBeEqualTo("NEW_NAME"); + } + } + + public class When_grouping_all_classifications_defined_in_a_project_by_a_given_category : concern_for_ClassificationPresenter + { + private ClassifiableSimulation _simulation1; + private ClassifiableSimulation _simulation2; + private ClassifiableSimulation _simulation3WithParent; + private ClassifiableObservedData _observedData; + + protected override void Context() + { + base.Context(); + var simulation1 = A.Fake().WithId("1"); + _simulation1 = new ClassifiableSimulation { Subject = A.Fake().WithId("1") }; + _simulation2 = new ClassifiableSimulation { Subject = A.Fake().WithId("2") }; + var parentClassification = new Classification { ClassificationType = ClassificationType.Simulation }; + _simulation3WithParent = new ClassifiableSimulation { Subject = A.Fake().WithId("3"), Parent = parentClassification }; + _observedData = new ClassifiableObservedData { Subject = new DataRepository() }; + _project.AddClassifiable(_simulation1); + _project.AddClassifiable(_simulation2); + _project.AddClassifiable(_simulation3WithParent); + _project.AddClassifiable(_observedData); + var simulationNode1 = new SimulationNode(_simulation1); + A.CallTo(() => _explorerPresenter.NodeFor(_simulation1)).Returns(simulationNode1); + var simulationNode2 = new SimulationNode(_simulation2); + var simulationNode3 = new SimulationNode(_simulation3WithParent); + A.CallTo(() => _explorerPresenter.NodeFor(_simulation2)).Returns(simulationNode2); + A.CallTo(() => _explorerPresenter.NodeFor(_simulation3WithParent)).Returns(simulationNode3); + A.CallTo(() => _explorerPresenter.NodeFor(_observedData)).Returns(new ObservedDataNode(_observedData)); + var parentClassificationNode = new ClassificationNode(parentClassification); + A.CallTo(() => _explorerPresenter.NodeFor(parentClassification)).Returns(parentClassificationNode); + _simulationFolderNode.AddChild(simulationNode1); + _simulationFolderNode.AddChild(simulationNode2); + _simulationFolderNode.AddChild(parentClassificationNode); + + } + + protected override void Because() + { + sut.GroupClassificationsByCategory(_simulationFolderNode, "Individual", x => "Human"); + } + + [Observation] + public void should_have_created_a_classifiaction_named_after_the_distinct_category_values() + { + humanClassification.ShouldNotBeNull(); + } + + private IClassification humanClassification + { + get { return _project.AllClassificationsByType(ClassificationType.Simulation).FindByName("Human"); } + } + + [Observation] + public void should_have_moved_the_node_for_the_simulations_that_were_not_classified_under_the_newly_created_classification() + { + _simulation1.Parent.ShouldBeEqualTo(humanClassification); + _simulation2.Parent.ShouldBeEqualTo(humanClassification); + } + + [Observation] + public void should_not_have_moved_the_node_for_the_simulations_that_were_already_classified() + { + _simulation3WithParent.Parent.ShouldNotBeEqualTo(humanClassification); + } + + [Observation] + public void should_not_have_moved_the_node_for_the_classifiable_that_do_not_have_the_right_type() + { + _observedData.Parent.ShouldNotBeEqualTo(humanClassification); + } + } + + public class When_removing_a_classification_folder_containing_classifiable_items : concern_for_ClassificationPresenter + { + private Classification _parentClassification; + private Classification _childClassification; + private ClassifiableSimulation _simulation; + private ITreeNode _childClassificationNode; + private ITreeNode _parentClassificationNode; + private SimulationNode _simulationNode; + + protected override void Context() + { + base.Context(); + + _parentClassification = new Classification { ClassificationType = ClassificationType.Simulation, Name = "parent" }; + _childClassification = new Classification { ClassificationType = ClassificationType.Simulation, Name = "child", Parent = _parentClassification }; + + sut.AddClassificationsToTree(new[] { _childClassification, _parentClassification }); + + //do that after so that real node and node fakes are created when adding the classificaiton to the tree + _project.AddClassification(_childClassification); + _project.AddClassification(_parentClassification); + + _simulation = new ClassifiableSimulation { Parent = _childClassification, Subject = A.Fake().WithId("Sim") }; + + _childClassificationNode = _classificationNodesCache[_childClassification]; + _simulationNode = new SimulationNode(_simulation); + _childClassificationNode.AddChild(_simulationNode); + + _parentClassificationNode = _childClassificationNode.ParentNode.DowncastTo>(); + } + + protected override void Because() + { + sut.RemoveClassification(_childClassificationNode); + } + + [Observation] + public void should_move_the_classifiable_node_to_the_parent_classification() + { + _parentClassificationNode.Children.ShouldContain(_simulationNode); + } + + [Observation] + public void should_attach_the_simulation_to_the_parent_classificaiton() + { + _simulation.Parent.ShouldBeEqualTo(_parentClassification); + } + + [Observation] + public void should_remove_the_classification_node_from_the_underlying_cache() + { + _classificationNodesCache[_childClassification].ShouldBeNull(); + } + + [Observation] + public void should_remove_the_classification_from_the_project() + { + _project.AllClassifications.Contains(_childClassification).ShouldBeFalse(); + } + + [Observation] + public void should_remove_the_classification_node_from_the_view() + { + _childClassificationNode.ParentNode.ShouldBeNull(); + _parentClassificationNode.Children.Contains(_childClassificationNode).ShouldBeFalse(); + } + } + + public class When_removing_a_classification_would_result_in_a_duplicate_node : concern_for_ClassificationPresenter + { + private IClassification _humanClassification; + private IClassification _humanOralClassification; + private IClassification _oralClassification; + private ClassifiableSimulation _simulation1; + private ClassifiableSimulation _simulation2; + private ITreeNode _humanOralClassificationNode; + private ITreeNode _humanClassificationNode; + private ITreeNode _oralClassificationNode; + + protected override void Context() + { + base.Context(); + //create the following tree + //human => oral=>S1 + //oral=>S2 + _humanClassification = new Classification { ClassificationType = ClassificationType.Simulation, Name = "human" }; + _humanOralClassification = new Classification { ClassificationType = ClassificationType.Simulation, Name = "oral", Parent = _humanClassification }; + _oralClassification = new Classification { ClassificationType = ClassificationType.Simulation, Name = "oral" }; + + sut.AddClassificationsToTree(new[] { _humanOralClassification, _humanClassification, _oralClassification }); + + _project.AddClassification(_humanOralClassification); + _project.AddClassification(_humanClassification); + _project.AddClassification(_oralClassification); + + _simulation1 = new ClassifiableSimulation { Parent = _humanOralClassification, Subject = A.Fake().WithName("S1")}; + _simulation2 = new ClassifiableSimulation { Parent = _oralClassification, Subject = A.Fake().WithName("S2") }; + + _humanOralClassificationNode = _classificationNodesCache[_humanOralClassification]; + _oralClassificationNode = _classificationNodesCache[_oralClassification]; + var simulation1Node = new SimulationNode(_simulation1).Under(_humanOralClassificationNode); + var simulation2Node = new SimulationNode(_simulation2).Under(_oralClassificationNode); + + _humanClassificationNode = _humanOralClassificationNode.ParentNode.DowncastTo>(); + + A.CallTo(() => _explorerPresenter.NodeFor(_humanOralClassification)).Returns(_humanOralClassificationNode); + A.CallTo(() => _explorerPresenter.NodeFor(_oralClassification)).Returns(_oralClassificationNode); + A.CallTo(() => _explorerPresenter.NodeFor(_humanClassification)).Returns(_humanClassificationNode); + } + + protected override void Because() + { + sut.RemoveClassification(_humanClassificationNode); + } + + [Observation] + public void should_move_the_classifiable_from_the_duplicate_into_the_equivalent_classification() + { + _simulation1.Parent.ShouldBeEqualTo(_oralClassification); + _simulation2.Parent.ShouldBeEqualTo(_oralClassification); + } + + [Observation] + public void should_delete_the_duplicate_classification_from_the_project() + { + _project.AllClassifications.Contains(_humanClassification).ShouldBeFalse(); + _project.AllClassifications.Contains(_humanOralClassification).ShouldBeFalse(); + } + + [Observation] + public void should_delete_the_duplicate_classification_node_from_the_view() + { + _classificationNodesCache[_humanClassification].ShouldBeNull(); + _classificationNodesCache[_humanOralClassification].ShouldBeNull(); + } + } + + public class When_moving_a_classifiable_node_defined_under_a_given_classification_node_under_another_classification_node : concern_for_ClassificationPresenter + { + private ClassifiableSimulation _simulation; + private IClassification _originalClassification; + private IClassification _targetClassification; + private SimulationNode _simulationNode; + private ITreeNode _originalClassificationNode; + private ITreeNode _targetClassificationNode; + + protected override void Context() + { + base.Context(); + _originalClassification = new Classification { ClassificationType = ClassificationType.Simulation, Name = "Original" }; + _targetClassification = new Classification { ClassificationType = ClassificationType.Simulation, Name = "Target" }; + _simulation = new ClassifiableSimulation { Parent = _originalClassification, Subject = A.Fake().WithName("S1") }; + sut.AddClassificationsToTree(new[] { _originalClassification, _targetClassification }); + _project.AddClassification(_originalClassification); + _project.AddClassification(_targetClassification); + _originalClassificationNode = _classificationNodesCache[_originalClassification]; + _targetClassificationNode = _classificationNodesCache[_targetClassification]; + _simulationNode = new SimulationNode(_simulation).Under(_originalClassificationNode); + } + + protected override void Because() + { + sut.MoveNode(_simulationNode, _targetClassificationNode); + } + + [Observation] + public void should_move_the_underlying_classifiable_under_the_new_classification() + { + _simulation.Parent.ShouldBeEqualTo(_targetClassification); + } + + [Observation] + public void should_move_the_simulation_node_under_the_new_classification_node() + { + _simulationNode.ParentNode.ShouldBeEqualTo(_targetClassificationNode); + _originalClassificationNode.Children.Contains(_simulationNode).ShouldBeFalse(); + } + } + + public class When_moving_an_observed_data_node_under_root_node : concern_for_ClassificationPresenter + { + private ITreeNode _observedDataNode; + private ClassifiableObservedData _classifiableObservedData; + private Classification _originalClassification; + + protected override void Context() + { + base.Context(); + _originalClassification = new Classification { ClassificationType = ClassificationType.ObservedData, Name = "Original" }; + _classifiableObservedData = new ClassifiableObservedData { Subject = new DataRepository(), Parent = _originalClassification }; + _observedDataNode = new ObservedDataNode(_classifiableObservedData); + _project.AddClassification(_originalClassification); + sut.AddClassificationsToTree(new[] { _originalClassification }); + } + + protected override void Because() + { + sut.MoveNode(_observedDataNode, _observedDataFolderNode); + } + + [Observation] + public void should_have_set_the_parent_classification_of_the_observed_data_classifiable_to_null() + { + _classifiableObservedData.Parent.ShouldBeNull(); + } + } + + public class When_testing_if_a_classification_node_can_be_moved_under_another_classification_node : concern_for_ClassificationPresenter + { + private ClassificationNode _observedDataClassificationNode; + private ClassificationNode _simulationClassificationNode; + private ClassificationNode _groupClassificationNode; + private ClassificationNode _subClassificationNode; + + protected override void Context() + { + base.Context(); + _observedDataClassificationNode = new ClassificationNode(new Classification { ClassificationType = ClassificationType.ObservedData, Name = "OBS" }); + _simulationClassificationNode = new ClassificationNode(new Classification { ClassificationType = ClassificationType.Simulation, Name = "SIM" }); + _groupClassificationNode = new ClassificationNode(new Classification { ClassificationType = ClassificationType.Simulation, Name = "PARENT" }); + _subClassificationNode = new ClassificationNode(new Classification { ClassificationType = ClassificationType.Simulation, Name = "SIM" }); + _groupClassificationNode.AddChild(_subClassificationNode); + } + + [Observation] + public void should_return_false_if_the_two_nodes_are_the_same() + { + sut.CanMove(_observedDataClassificationNode, _observedDataClassificationNode).ShouldBeFalse(); + } + + [Observation] + public void should_return_false_if_the_two_underlying_classification_do_not_have_the_same_type() + { + sut.CanMove(_observedDataClassificationNode, _simulationClassificationNode).ShouldBeFalse(); + } + + [Observation] + public void should_return_false_if_the_target_classification_already_have_a_sub_classifiation_with_the_same_name() + { + sut.CanMove(_simulationClassificationNode, _groupClassificationNode).ShouldBeFalse(); + } + + [Observation] + public void should_return_false_if_the_classification_to_move_is_an_ancestor_of_the_target_classification() + { + sut.CanMove(_groupClassificationNode, _subClassificationNode).ShouldBeFalse(); + } + + [Observation] + public void should_return_true_otherwise() + { + sut.CanMove(_subClassificationNode, _simulationClassificationNode).ShouldBeTrue(); + } + } + + public class When_removing_all_empty_classifications_from_the_classification_presenter : concern_for_ClassificationPresenter + { + private IClassification _parentClassification; + private IClassification _childEmptyClassification; + private IClassification _childClassification; + private ITreeNode _childEmptyClassificationNode; + private ITreeNode _childClassificationNode; + private ITreeNode _parentClassificationNode; + private SimulationNode _simulationNode; + private ClassifiableSimulation _simulation; + + protected override void Context() + { + base.Context(); + _parentClassification = new Classification { ClassificationType = ClassificationType.Simulation, Name = "parent" }; + _childEmptyClassification = new Classification { ClassificationType = ClassificationType.Simulation, Name = "childEmpty", Parent = _parentClassification }; + _childClassification = new Classification { ClassificationType = ClassificationType.Simulation, Name = "child", Parent = _parentClassification }; + _simulation = new ClassifiableSimulation { Subject = A.Fake() }; + sut.AddClassificationsToTree(new[] { _childEmptyClassification, _parentClassification, _childClassification }); + + //do that after so that real node and node fakes are created when adding the classificaiton to the tree + _project.AddClassification(_childEmptyClassification); + _project.AddClassification(_parentClassification); + _project.AddClassification(_childClassification); + _childEmptyClassificationNode = _classificationNodesCache[_childEmptyClassification]; + _childClassificationNode = _classificationNodesCache[_childClassification]; + _parentClassificationNode = _childClassificationNode.ParentNode.DowncastTo>(); + _simulationNode = new SimulationNode(_simulation); + _childClassificationNode.AddChild(_simulationNode); + _parentClassificationNode = _childClassificationNode.ParentNode.DowncastTo>(); + A.CallTo(() => _explorerPresenter.NodeFor(_childEmptyClassification)).Returns(_childEmptyClassificationNode); + A.CallTo(() => _explorerPresenter.NodeFor(_childClassification)).Returns(_childClassificationNode); + A.CallTo(() => _explorerPresenter.NodeFor(_parentClassification)).Returns(_parentClassificationNode); + } + + protected override void Because() + { + sut.RemoveEmptyClassifcations(); + } + + [Observation] + public void should_remove_all_classifications_that_do_not_contain_any_classifiable() + { + _project.AllClassifications.Contains(_childEmptyClassification).ShouldBeFalse(); + _project.AllClassifications.Contains(_childClassification).ShouldBeTrue(); + _project.AllClassifications.Contains(_parentClassification).ShouldBeTrue(); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Presentation/ObjectBaseNodeSpecs.cs b/tests/OSPSuite.Core.Tests/Presentation/ObjectBaseNodeSpecs.cs new file mode 100644 index 000000000..53c1c4b1c --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Presentation/ObjectBaseNodeSpecs.cs @@ -0,0 +1,90 @@ +using System.Linq; +using FakeItEasy; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain; +using OSPSuite.Presentation.Nodes; +using OSPSuite.Presentation.Presenters.Nodes; + +namespace OSPSuite.Presentation +{ + public abstract class concern_for_ObjectBaseNode : ContextSpecification> + { + protected IEntity _entity; + + protected override void Context() + { + _entity = new Parameter().WithId("id").WithName("tutu"); + sut = new ObjectWithIdAndNameNode(_entity); + } + } + + public class When_retrieving_the_name_of_an_object_base_node : concern_for_ObjectBaseNode + { + [Observation] + public void should_return_the_name_of_the_underlying_entity() + { + sut.Text.ShouldBeEqualTo(_entity.Name); + } + } + + public class When_retrieving_the_id_of_an_object_base_node : concern_for_ObjectBaseNode + { + [Observation] + public void should_return_the_id_of_the_underlying_entity() + { + sut.Id.ShouldBeEqualTo(_entity.Id); + } + } + + public class When_the_underlying_object_base_name_has_been_changed : concern_for_ObjectBaseNode + { + private bool _eventReceived; + + protected override void Context() + { + base.Context(); + sut.TextChanged += node => _eventReceived = true; + } + + protected override void Because() + { + _entity.Name = "tralala"; + } + + [Observation] + public void should_notify_that_its_name_has_changed() + { + _eventReceived.ShouldBeTrue(); + } + } + + public class When_removing_a_child_node : concern_for_ObjectBaseNode + { + private IEntity _anotherEntity; + private ITreeNode _childNode; + private ITreeNode _anotherChild; + + protected override void Context() + { + base.Context(); + _anotherEntity = new Parameter().WithId("tata").WithName("tutu"); + _childNode = new ObjectWithIdAndNameNode(_anotherEntity); + _anotherChild = A.Fake>(); + sut.AddChild(_childNode); + sut.AddChild(_anotherChild); + } + + protected override void Because() + { + sut.RemoveChild(_childNode); + sut.RemoveChild(_anotherChild); + } + + [Observation] + public void should_remove_the_node_from_the_internal_list_of_children() + { + sut.Children.Contains(_childNode).ShouldBeFalse(); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Presentation/SubPresenterItemSpecs.cs b/tests/OSPSuite.Core.Tests/Presentation/SubPresenterItemSpecs.cs new file mode 100644 index 000000000..d02543e67 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Presentation/SubPresenterItemSpecs.cs @@ -0,0 +1,40 @@ +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Presentation.Core; +using OSPSuite.Presentation.Presenters; + +namespace OSPSuite.Presentation +{ + public abstract class concern_for_SubPresenterItem : ContextSpecification + { + protected int _index; + + protected override void Context() + { + _index = 1; + sut = new SubPresenterItemForSpecs {Index = _index}; + } + } + + public class When_returning_the_index_for_an_individual_item : concern_for_SubPresenterItem + { + [Observation] + public void should_return_the_index_it_was_created_with() + { + sut.Index.ShouldBeEqualTo(_index); + } + } + + public class When_returning_its_presenter_type_ : concern_for_SubPresenterItem + { + [Observation] + public void should_return_the_type_it_was_created_with() + { + sut.PresenterType.ShouldBeEqualTo(typeof(IQuantitySelectionPresenter)); + } + } + + internal class SubPresenterItemForSpecs : SubPresenterItem + { + } +} \ No newline at end of file From 59b6aea45947f70e8d09b818613b91c05dd9dc09 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Wed, 29 Mar 2017 10:59:16 -0400 Subject: [PATCH 16/50] Update scripts version --- scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts b/scripts index f18c68d73..1f7603305 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit f18c68d7339bda7af808abd4a60990e3856a00f5 +Subproject commit 1f760330518b4d74f79a123b42d646aa7686854f From 1af0f5e9345deb829fab12207b2b61058cffb04b Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Wed, 29 Mar 2017 14:53:30 -0400 Subject: [PATCH 17/50] Update Smart XLS (#37) --- appveyor-coverage.yml | 1 + appveyor.yml | 1 + src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj | 5 +++-- src/OSPSuite.Infrastructure/packages.config | 6 +++--- src/OSPSuite.Presentation/OSPSuite.Presentation.csproj | 5 +++-- src/OSPSuite.Presentation/packages.config | 2 +- tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj | 5 +++-- tests/OSPSuite.Core.Tests/packages.config | 2 +- 8 files changed, 16 insertions(+), 11 deletions(-) diff --git a/appveyor-coverage.yml b/appveyor-coverage.yml index c21e4c04b..e3afce6d2 100644 --- a/appveyor-coverage.yml +++ b/appveyor-coverage.yml @@ -24,6 +24,7 @@ before_build: - nuget sources add -name funcparser -source https://ci.appveyor.com/nuget/ospsuite-funcparser - nuget sources add -name simmodel -source https://ci.appveyor.com/nuget/ospsuite-simmodel - nuget sources add -name cvodes -source https://ci.appveyor.com/nuget/ospsuite-simmodel-solver-cvodes-282 + - nuget sources add -name smartxls -source https://ci.appveyor.com/nuget/ospsuite-smartxls - nuget restore build: diff --git a/appveyor.yml b/appveyor.yml index 2f555db53..f4a63a41f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,6 +24,7 @@ before_build: - nuget sources add -name funcparser -source https://ci.appveyor.com/nuget/ospsuite-funcparser - nuget sources add -name simmodel -source https://ci.appveyor.com/nuget/ospsuite-simmodel - nuget sources add -name cvodes -source https://ci.appveyor.com/nuget/ospsuite-simmodel-solver-cvodes-282 + - nuget sources add -name smartxls -source https://ci.appveyor.com/nuget/ospsuite-smartxls - nuget restore build: diff --git a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj index 93503c9d8..0cf5abc7a 100644 --- a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj +++ b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj @@ -79,8 +79,9 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - - ..\..\packages\OSPSuite.SmartXLS.2.6.2.8\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll + True diff --git a/src/OSPSuite.Infrastructure/packages.config b/src/OSPSuite.Infrastructure/packages.config index 08b131d4b..16afc079d 100644 --- a/src/OSPSuite.Infrastructure/packages.config +++ b/src/OSPSuite.Infrastructure/packages.config @@ -8,9 +8,9 @@ - - - + + + \ No newline at end of file diff --git a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj index dfba0ccb7..9c1efb0f8 100644 --- a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj +++ b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj @@ -51,8 +51,9 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - - ..\..\packages\OSPSuite.SmartXLS.2.6.2.8\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll + True diff --git a/src/OSPSuite.Presentation/packages.config b/src/OSPSuite.Presentation/packages.config index 3ac9ca443..2d15ef643 100644 --- a/src/OSPSuite.Presentation/packages.config +++ b/src/OSPSuite.Presentation/packages.config @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index 68d06d1ca..5b5f7024a 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -113,8 +113,9 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - - ..\..\packages\OSPSuite.SmartXLS.2.6.2.8\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll + True diff --git a/tests/OSPSuite.Core.Tests/packages.config b/tests/OSPSuite.Core.Tests/packages.config index dc77ee8ac..d382f4768 100644 --- a/tests/OSPSuite.Core.Tests/packages.config +++ b/tests/OSPSuite.Core.Tests/packages.config @@ -15,7 +15,7 @@ - + \ No newline at end of file From 47ae48f6cd4528083f317a2a3c836fb1ca44e7ae Mon Sep 17 00:00:00 2001 From: Robert McIntosh Date: Thu, 30 Mar 2017 10:34:20 -0400 Subject: [PATCH 18/50] Fixes Open-Systems-Pharmacology/PK-Sim#78 - Crash when starting obs data import (#36) --- .../Views/Importer/ImporterView.cs | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/OSPSuite.UI/Views/Importer/ImporterView.cs b/src/OSPSuite.UI/Views/Importer/ImporterView.cs index c32cc823e..d264a6dd9 100644 --- a/src/OSPSuite.UI/Views/Importer/ImporterView.cs +++ b/src/OSPSuite.UI/Views/Importer/ImporterView.cs @@ -472,7 +472,7 @@ private void importAllData() if (newTables.Count == 0) { - XtraMessageBox.Show("Nothing imported!", base.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); + XtraMessageBox.Show("Nothing imported!", Text, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } @@ -535,7 +535,7 @@ private bool promptForOverwrite(IList sheets, string excelFile) if (_imports.Tables.Cast().Any(existingTable => existingTable.Source == sourceSheet)) { overwrite = - (XtraMessageBox.Show(OVERWRITE_QUERY_TEXT, base.Text, MessageBoxButtons.YesNo, + (XtraMessageBox.Show(OVERWRITE_QUERY_TEXT, Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes); asked = true; @@ -553,8 +553,7 @@ private List collectAllTables(IList sheets, DataSet pre foreach (var sheet in sheets) { if (!preview.Tables.Contains(sheet)) continue; - ColumnMappingControl cmc; - cmc = _columnMappingControls.ContainsKey(sheet) + var cmc = _columnMappingControls.ContainsKey(sheet) ? getExistingColumnMappingControl(sheet) : createNewColumnMappingControl(preview, sheet); cmc.ValidateMapping(); @@ -586,8 +585,7 @@ private ColumnMappingControl createNewColumnMappingControl(DataSet preview, stri private ColumnMappingControl getExistingColumnMappingControl(string sheet) { - ColumnMappingControl cmc; - cmc = _columnMappingControls[sheet]; + var cmc = _columnMappingControls[sheet]; cmc.OnMappingCompleted += setImportFlagToTrue; cmc.OnMissingMapping += setImportFlagToFalse; cmc.OnMappingCompleted -= onColumnMappingMappingCompleted; @@ -629,27 +627,31 @@ private void cleanColumnMappingControls() private void cleanMemory() { _namingView = null; - _openSourceFileControl.OnOpenSourceFile -= openSourceFileEvent; - _openSourceFileControl = null; + if (_openSourceFileControl != null) + { + _openSourceFileControl.OnOpenSourceFile -= openSourceFileEvent; + _openSourceFileControl = null; + } + if (_imports != null) { foreach (ImportDataTable table in _imports.Tables) { - if (table.MetaData != null) table.MetaData.Dispose(); + table.MetaData?.Dispose(); table.Dispose(); } _imports.Dispose(); } if (_importDataTable != null) { - if (_importDataTable.MetaData != null) _importDataTable.MetaData.Dispose(); + _importDataTable.MetaData?.Dispose(); _importDataTable.Dispose(); } CleanUpHelper.ReleaseEvents(_dataSetControl); - if (_dataSetControl != null) _dataSetControl.Dispose(); + _dataSetControl?.Dispose(); CleanUpHelper.ReleaseEvents(_sourceFilePreviewControl); - if (_sourceFilePreviewControl != null) _sourceFilePreviewControl.Dispose(); + _sourceFilePreviewControl?.Dispose(); CleanUpHelper.ReleaseControls(Controls); Controls.Clear(); @@ -666,7 +668,7 @@ private void cleanMemory() _columnInfos = null; cleanColumnMappingControls(); - if (_columnMappingControls != null) _columnMappingControls.Clear(); + _columnMappingControls?.Clear(); _columnMappingControls = null; columnMappingControlPanel.Controls.Clear(); From c63862817c52ad5a3c405b695490ab3bda1befdb Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 30 Mar 2017 11:02:15 -0400 Subject: [PATCH 19/50] Fixes references to corrupted SX --- src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj | 3 +-- src/OSPSuite.Presentation/OSPSuite.Presentation.csproj | 3 +-- tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj index 0cf5abc7a..e091b39ce 100644 --- a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj +++ b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj @@ -79,9 +79,8 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - + ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll - True diff --git a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj index 9c1efb0f8..3de1b3632 100644 --- a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj +++ b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj @@ -51,9 +51,8 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - + ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll - True diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index 5b5f7024a..4806373b7 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -113,9 +113,8 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - + ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll - True From d0548b05a8eeb5a9b4286b5a7a9da8373d0a8801 Mon Sep 17 00:00:00 2001 From: Robert McIntosh Date: Wed, 5 Apr 2017 14:30:44 -0400 Subject: [PATCH 20/50] update ospsuite.SmartXLS to release version (#38) --- src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj | 5 +++-- src/OSPSuite.Infrastructure/packages.config | 2 +- src/OSPSuite.Presentation/OSPSuite.Presentation.csproj | 5 +++-- src/OSPSuite.Presentation/packages.config | 2 +- tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj | 5 +++-- tests/OSPSuite.Core.Tests/packages.config | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj index e091b39ce..b07f4a154 100644 --- a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj +++ b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj @@ -79,8 +79,9 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - - ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.2.90\lib\net45\SX.dll + True diff --git a/src/OSPSuite.Infrastructure/packages.config b/src/OSPSuite.Infrastructure/packages.config index 16afc079d..38ea15d82 100644 --- a/src/OSPSuite.Infrastructure/packages.config +++ b/src/OSPSuite.Infrastructure/packages.config @@ -8,7 +8,7 @@ - + diff --git a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj index 3de1b3632..f781012ef 100644 --- a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj +++ b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj @@ -51,8 +51,9 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - - ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.2.90\lib\net45\SX.dll + True diff --git a/src/OSPSuite.Presentation/packages.config b/src/OSPSuite.Presentation/packages.config index 2d15ef643..309c0a61b 100644 --- a/src/OSPSuite.Presentation/packages.config +++ b/src/OSPSuite.Presentation/packages.config @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index 4806373b7..ea3403ed6 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -113,8 +113,9 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - - ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.2.90\lib\net45\SX.dll + True diff --git a/tests/OSPSuite.Core.Tests/packages.config b/tests/OSPSuite.Core.Tests/packages.config index d382f4768..4085e9682 100644 --- a/tests/OSPSuite.Core.Tests/packages.config +++ b/tests/OSPSuite.Core.Tests/packages.config @@ -15,7 +15,7 @@ - + \ No newline at end of file From ee5ba8f0ebda231635535b5f9172190992db9c3e Mon Sep 17 00:00:00 2001 From: Robert McIntosh Date: Tue, 11 Apr 2017 10:49:15 -0400 Subject: [PATCH 21/50] Fixes #97 - Cannot zoom-out after zoom-in simulated-plot (#39) * Fixes #97 - Cannot zoom-out after zoom-in simulated-plot * Fixes #97 - Cannot zoom-out after zoom-in simulated-plot --- src/OSPSuite.UI/Controls/UxChartControl.cs | 2 +- src/OSPSuite.UI/Views/Charts/ChartDisplayView.Designer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OSPSuite.UI/Controls/UxChartControl.cs b/src/OSPSuite.UI/Controls/UxChartControl.cs index 39c2aa337..64c99771b 100644 --- a/src/OSPSuite.UI/Controls/UxChartControl.cs +++ b/src/OSPSuite.UI/Controls/UxChartControl.cs @@ -32,7 +32,6 @@ public UxChartControl(bool addDefaultPopup = true) _clipboardTask = new ClipboardTask(); _barManager = new BarManager {Form = this}; _popupMenu = new PopupMenu(_barManager); - _barManager.SetPopupContextMenu(this, _popupMenu); if (addDefaultPopup) initializePopup(); @@ -103,6 +102,7 @@ public virtual void CopyChartToClipboard(ChartControl chartControl) private void initializePopup() { + _barManager.SetPopupContextMenu(this, _popupMenu); AddPopupMenu(Captions.CopyAsImage, CopyToClipboard, ApplicationIcons.Paste); } diff --git a/src/OSPSuite.UI/Views/Charts/ChartDisplayView.Designer.cs b/src/OSPSuite.UI/Views/Charts/ChartDisplayView.Designer.cs index fdb7e5ba8..4f69ac823 100644 --- a/src/OSPSuite.UI/Views/Charts/ChartDisplayView.Designer.cs +++ b/src/OSPSuite.UI/Views/Charts/ChartDisplayView.Designer.cs @@ -55,7 +55,7 @@ private void InitializeComponent() this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); this.barDockControlRight = new DevExpress.XtraBars.BarDockControl(); - this.chartControl = new UxChartControl(); + this.chartControl = new UxChartControl(addDefaultPopup: false); ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this._barManager)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.chartControl)).BeginInit(); From 48da22ba00531e73d3880e1284e9615e15269640 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Tue, 11 Apr 2017 11:37:20 -0400 Subject: [PATCH 22/50] Fixes #94 and Fixes #96 (#40) --- src/OSPSuite.Core/CoreRegister.cs | 10 ++++++- .../Core/EventBuilderTaskIntegrationTests.cs | 4 +-- .../Core/RegistrationSpecs.cs | 30 +++++++++++++++++++ .../UnitTestContextSpecificationSpecs.cs | 2 ++ .../OSPSuite.Core.Tests.csproj | 1 + 5 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 tests/OSPSuite.Core.Tests/Core/RegistrationSpecs.cs diff --git a/src/OSPSuite.Core/CoreRegister.cs b/src/OSPSuite.Core/CoreRegister.cs index 9c434a108..a306a859b 100644 --- a/src/OSPSuite.Core/CoreRegister.cs +++ b/src/OSPSuite.Core/CoreRegister.cs @@ -10,7 +10,6 @@ using OSPSuite.Core.Domain.Services.ParameterIdentifications; using OSPSuite.Core.Domain.Services.SensitivityAnalyses; using OSPSuite.Core.Domain.UnitSystem; -using OSPSuite.Core.Reporting; using OSPSuite.Core.Serialization; using OSPSuite.Core.Serialization.Xml; using OSPSuite.Utility.Container; @@ -81,6 +80,8 @@ public override void RegisterInContainer(IContainer container) reigsterConverters(container); + registerParameterIdentificationRunFactories(container); + //FACTORIES container.RegisterFactory(); container.RegisterFactory(); @@ -124,5 +125,12 @@ private static void registerComparers(IContainer container) }); container.Register(); } + + private static void registerParameterIdentificationRunFactories(IContainer container) + { + container.Register(); + container.Register(); + container.Register(); + } } } \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Core/EventBuilderTaskIntegrationTests.cs b/tests/OSPSuite.Core.Tests/Core/EventBuilderTaskIntegrationTests.cs index 883e06749..389ba2b0a 100644 --- a/tests/OSPSuite.Core.Tests/Core/EventBuilderTaskIntegrationTests.cs +++ b/tests/OSPSuite.Core.Tests/Core/EventBuilderTaskIntegrationTests.cs @@ -7,7 +7,7 @@ namespace OSPSuite.Core { - public abstract class concern_for_event_builder_task : ContextForModelConstructorIntegration + public abstract class concern_for_EventBuilderTask : ContextForModelConstructorIntegration { protected CreationResult _creationResult; @@ -18,7 +18,7 @@ public override void GlobalContext() } } - public class When_creating_simulation_with_many_floating_molecules_and_nested_applications_and_nonapplication_eventgroups : concern_for_event_builder_task + public class When_creating_simulation_with_many_floating_molecules_and_nested_applications_and_nonapplication_eventgroups : concern_for_EventBuilderTask { private IList _allEventGroups; private const string C1 = "C1"; diff --git a/tests/OSPSuite.Core.Tests/Core/RegistrationSpecs.cs b/tests/OSPSuite.Core.Tests/Core/RegistrationSpecs.cs new file mode 100644 index 000000000..b86ad3a7e --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Core/RegistrationSpecs.cs @@ -0,0 +1,30 @@ +using System.Threading; +using OSPSuite.BDDHelper; +using OSPSuite.Core.Domain.ParameterIdentifications; +using OSPSuite.Core.Domain.Services.ParameterIdentifications; +using OSPSuite.Helpers; +using OSPSuite.Utility.Container; + +namespace OSPSuite.Core +{ + public class When_performing_core_registration : ContextForIntegration + { + [Observation] + public void should_be_able_to_retrieve_parameter_identification_run_factories_for_all_registered_mode() + { + var parameterIdentificationRunFactory = IoC.Resolve(); + var cancellationToken = new CancellationToken(); + var parameterIdentification = new ParameterIdentification(); + + createFor(parameterIdentification, parameterIdentificationRunFactory, cancellationToken); + createFor(parameterIdentification, parameterIdentificationRunFactory, cancellationToken); + createFor(parameterIdentification, parameterIdentificationRunFactory, cancellationToken); + } + + private static void createFor(ParameterIdentification parameterIdentification, IParameterIdentificationRunFactory parameterIdentificationRunFactory, CancellationToken cancellationToken) where T : ParameterIdentificationRunMode, new() + { + parameterIdentification.Configuration.RunMode = new T(); + parameterIdentificationRunFactory.CreateFor(parameterIdentification, cancellationToken); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs b/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs index 1f0159f4f..fc55d3c67 100644 --- a/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs @@ -63,6 +63,8 @@ public override void GlobalContext() container.RegisterImplementationOf(A.Fake()); container.RegisterImplementationOf(A.Fake()); container.RegisterImplementationOf(A.Fake()); + container.RegisterImplementationOf(A.Fake()); + container.RegisterImplementationOf(A.Fake()); var applicationConfiguration = A.Fake(); A.CallTo(() => applicationConfiguration.Product).Returns(Origins.Other); diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index ea3403ed6..90859263a 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -167,6 +167,7 @@ + From e4be1db4207ce20df63e58a27b9dff1da9123172 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Tue, 11 Apr 2017 14:45:45 -0400 Subject: [PATCH 23/50] Work on #82 Swap SmartXLS (#41) --- src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj | 4 ++-- src/OSPSuite.Infrastructure/packages.config | 2 +- src/OSPSuite.Presentation/OSPSuite.Presentation.csproj | 5 ++--- src/OSPSuite.Presentation/packages.config | 2 +- tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj | 4 ++-- tests/OSPSuite.Core.Tests/packages.config | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj index b07f4a154..81378345f 100644 --- a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj +++ b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj @@ -80,8 +80,8 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - ..\..\packages\OSPSuite.SmartXLS.2.6.2.90\lib\net45\SX.dll - True + False + ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll diff --git a/src/OSPSuite.Infrastructure/packages.config b/src/OSPSuite.Infrastructure/packages.config index 38ea15d82..16afc079d 100644 --- a/src/OSPSuite.Infrastructure/packages.config +++ b/src/OSPSuite.Infrastructure/packages.config @@ -8,7 +8,7 @@ - + diff --git a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj index f781012ef..3de1b3632 100644 --- a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj +++ b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj @@ -51,9 +51,8 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - - ..\..\packages\OSPSuite.SmartXLS.2.6.2.90\lib\net45\SX.dll - True + + ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll diff --git a/src/OSPSuite.Presentation/packages.config b/src/OSPSuite.Presentation/packages.config index 309c0a61b..2d15ef643 100644 --- a/src/OSPSuite.Presentation/packages.config +++ b/src/OSPSuite.Presentation/packages.config @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index 90859263a..6394078fe 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -114,8 +114,8 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - ..\..\packages\OSPSuite.SmartXLS.2.6.2.90\lib\net45\SX.dll - True + False + ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll diff --git a/tests/OSPSuite.Core.Tests/packages.config b/tests/OSPSuite.Core.Tests/packages.config index 4085e9682..d382f4768 100644 --- a/tests/OSPSuite.Core.Tests/packages.config +++ b/tests/OSPSuite.Core.Tests/packages.config @@ -15,7 +15,7 @@ - + \ No newline at end of file From 2cd98856096aae776377e35a031b35774dd95ffd Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Wed, 12 Apr 2017 10:52:41 -0400 Subject: [PATCH 24/50] Fixes #42 preview origin data button too small (#43) --- .../OSPSuite.Infrastructure.csproj | 6 +- src/OSPSuite.Infrastructure/packages.config | 2 +- .../OSPSuite.Presentation.csproj | 5 +- src/OSPSuite.Presentation/packages.config | 2 +- .../Views/Charts/ChartTemplateManagerView.cs | 2 +- .../Views/Importer/ImporterView.Designer.cs | 167 ++++++++---------- .../Views/Importer/ImporterView.cs | 11 +- .../OSPSuite.Core.Tests.csproj | 6 +- tests/OSPSuite.Core.Tests/packages.config | 2 +- 9 files changed, 101 insertions(+), 102 deletions(-) diff --git a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj index 81378345f..fe4aff88f 100644 --- a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj +++ b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj @@ -79,9 +79,9 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - - False - ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.3.1\lib\net45\SX.dll + True diff --git a/src/OSPSuite.Infrastructure/packages.config b/src/OSPSuite.Infrastructure/packages.config index 16afc079d..7ea49cc45 100644 --- a/src/OSPSuite.Infrastructure/packages.config +++ b/src/OSPSuite.Infrastructure/packages.config @@ -8,7 +8,7 @@ - + diff --git a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj index 3de1b3632..e0087890c 100644 --- a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj +++ b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj @@ -51,8 +51,9 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - - ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.3.1\lib\net45\SX.dll + True diff --git a/src/OSPSuite.Presentation/packages.config b/src/OSPSuite.Presentation/packages.config index 2d15ef643..2d2779627 100644 --- a/src/OSPSuite.Presentation/packages.config +++ b/src/OSPSuite.Presentation/packages.config @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/src/OSPSuite.UI/Views/Charts/ChartTemplateManagerView.cs b/src/OSPSuite.UI/Views/Charts/ChartTemplateManagerView.cs index a249219af..04685d7f5 100644 --- a/src/OSPSuite.UI/Views/Charts/ChartTemplateManagerView.cs +++ b/src/OSPSuite.UI/Views/Charts/ChartTemplateManagerView.cs @@ -117,7 +117,7 @@ public override void InitializeResources() gridViewTemplates.OptionsSelection.EnableAppearanceFocusedRow = true; loadTemplateButton.InitWithImage(ApplicationIcons.Load, Captions.LoadTemplate); - loadTemplateControlItem.AdjustButtonSize(UIConstants.Size.LARGE_BUTTON_WIDTH, UIConstants.Size.BUTTON_HEIGHT); + loadTemplateControlItem.AdjustLongButtonSize(); Caption = Captions.ManageChartTemplates; } diff --git a/src/OSPSuite.UI/Views/Importer/ImporterView.Designer.cs b/src/OSPSuite.UI/Views/Importer/ImporterView.Designer.cs index 489b52150..a758b0575 100644 --- a/src/OSPSuite.UI/Views/Importer/ImporterView.Designer.cs +++ b/src/OSPSuite.UI/Views/Importer/ImporterView.Designer.cs @@ -33,21 +33,17 @@ private void InitializeComponent() this.SourcePage = new DevExpress.XtraTab.XtraTabPage(); this.layoutControlSourceTab = new DevExpress.XtraLayout.LayoutControl(); this.btnSelectRange = new DevExpress.XtraEditors.SimpleButton(); - this.btnImportAll = new DevExpress.XtraEditors.SimpleButton(); this.openSourceFileControlPanel = new DevExpress.XtraEditors.PanelControl(); this.columnMappingControlPanel = new DevExpress.XtraEditors.PanelControl(); this.sourceFilePreviewControlPanel = new DevExpress.XtraEditors.PanelControl(); - this.btnImport = new DevExpress.XtraEditors.SimpleButton(); this.layoutControlGroupSourceTab = new DevExpress.XtraLayout.LayoutControlGroup(); this.Mapping = new DevExpress.XtraLayout.LayoutControlItem(); this.Preview = new DevExpress.XtraLayout.LayoutControlItem(); this.splitterItem = new DevExpress.XtraLayout.SplitterItem(); this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); - this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutItemSelectRange = new DevExpress.XtraLayout.LayoutControlItem(); this.ImportsPage = new DevExpress.XtraTab.XtraTabPage(); this.layoutControlTab = new DevExpress.XtraLayout.LayoutControl(); this.panelImportedTabs = new DevExpress.XtraEditors.PanelControl(); @@ -59,6 +55,10 @@ private void InitializeComponent() this.layoutControl = new DevExpress.XtraLayout.LayoutControl(); this.layoutControlGroup = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.btnImportAll = new DevExpress.XtraEditors.SimpleButton(); + this.layoutItemImportAll = new DevExpress.XtraLayout.LayoutControlItem(); + this.btnImport = new DevExpress.XtraEditors.SimpleButton(); + this.layoutItemImport = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlBase)).BeginInit(); this.layoutControlBase.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroupBase)).BeginInit(); @@ -81,10 +81,8 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.splitterItem)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutItemSelectRange)).BeginInit(); this.ImportsPage.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlTab)).BeginInit(); this.layoutControlTab.SuspendLayout(); @@ -98,6 +96,8 @@ private void InitializeComponent() this.layoutControl.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutItemImportAll)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutItemImport)).BeginInit(); this.SuspendLayout(); // // btnCancel @@ -107,8 +107,8 @@ private void InitializeComponent() // // btnOk // - this.btnOk.Location = new System.Drawing.Point(468, 12); - this.btnOk.Size = new System.Drawing.Size(153, 22); + this.btnOk.Location = new System.Drawing.Point(459, 12); + this.btnOk.Size = new System.Drawing.Size(162, 22); // // layoutControlBase // @@ -128,8 +128,8 @@ private void InitializeComponent() // // layoutItemOK // - this.layoutItemOK.Location = new System.Drawing.Point(456, 0); - this.layoutItemOK.Size = new System.Drawing.Size(157, 26); + this.layoutItemOK.Location = new System.Drawing.Point(447, 0); + this.layoutItemOK.Size = new System.Drawing.Size(166, 26); // // layoutItemCancel // @@ -139,7 +139,7 @@ private void InitializeComponent() // emptySpaceItemBase // this.emptySpaceItemBase.Location = new System.Drawing.Point(228, 0); - this.emptySpaceItemBase.Size = new System.Drawing.Size(228, 26); + this.emptySpaceItemBase.Size = new System.Drawing.Size(219, 26); // // layoutItemExtra // @@ -169,12 +169,12 @@ private void InitializeComponent() // layoutControlSourceTab // this.layoutControlSourceTab.AllowCustomization = false; - this.layoutControlSourceTab.Controls.Add(this.btnSelectRange); + this.layoutControlSourceTab.Controls.Add(this.btnImport); this.layoutControlSourceTab.Controls.Add(this.btnImportAll); + this.layoutControlSourceTab.Controls.Add(this.btnSelectRange); this.layoutControlSourceTab.Controls.Add(this.openSourceFileControlPanel); this.layoutControlSourceTab.Controls.Add(this.columnMappingControlPanel); this.layoutControlSourceTab.Controls.Add(this.sourceFilePreviewControlPanel); - this.layoutControlSourceTab.Controls.Add(this.btnImport); this.layoutControlSourceTab.Dock = System.Windows.Forms.DockStyle.Fill; this.layoutControlSourceTab.Location = new System.Drawing.Point(0, 0); this.layoutControlSourceTab.Name = "layoutControlSourceTab"; @@ -188,25 +188,12 @@ private void InitializeComponent() // btnSelectRange // this.btnSelectRange.Location = new System.Drawing.Point(12, 497); - this.btnSelectRange.MaximumSize = new System.Drawing.Size(120, 22); - this.btnSelectRange.MinimumSize = new System.Drawing.Size(120, 22); this.btnSelectRange.Name = "btnSelectRange"; - this.btnSelectRange.Size = new System.Drawing.Size(120, 22); + this.btnSelectRange.Size = new System.Drawing.Size(285, 22); this.btnSelectRange.StyleController = this.layoutControlSourceTab; - this.btnSelectRange.TabIndex = 8; + this.btnSelectRange.TabIndex = 9; this.btnSelectRange.Text = "btnSelectRange"; // - // btnImportAll - // - this.btnImportAll.Location = new System.Drawing.Point(566, 497); - this.btnImportAll.MaximumSize = new System.Drawing.Size(78, 22); - this.btnImportAll.MinimumSize = new System.Drawing.Size(78, 22); - this.btnImportAll.Name = "btnImportAll"; - this.btnImportAll.Size = new System.Drawing.Size(78, 22); - this.btnImportAll.StyleController = this.layoutControlSourceTab; - this.btnImportAll.TabIndex = 5; - this.btnImportAll.Text = "Import All"; - // // openSourceFileControlPanel // this.openSourceFileControlPanel.Location = new System.Drawing.Point(24, 24); @@ -228,15 +215,6 @@ private void InitializeComponent() this.sourceFilePreviewControlPanel.Size = new System.Drawing.Size(371, 411); this.sourceFilePreviewControlPanel.TabIndex = 6; // - // btnImport - // - this.btnImport.Location = new System.Drawing.Point(648, 497); - this.btnImport.Name = "btnImport"; - this.btnImport.Size = new System.Drawing.Size(77, 22); - this.btnImport.StyleController = this.layoutControlSourceTab; - this.btnImport.TabIndex = 4; - this.btnImport.Text = "Import"; - // // layoutControlGroupSourceTab // this.layoutControlGroupSourceTab.CustomizationFormText = "Root"; @@ -247,12 +225,12 @@ private void InitializeComponent() this.Preview, this.splitterItem, this.layoutControlGroup2, - this.layoutControlItem1, - this.layoutControlItem3, - this.layoutControlItem5, - this.emptySpaceItem1}); + this.emptySpaceItem1, + this.layoutItemSelectRange, + this.layoutItemImportAll, + this.layoutItemImport}); this.layoutControlGroupSourceTab.Location = new System.Drawing.Point(0, 0); - this.layoutControlGroupSourceTab.Name = "layoutControlGroupSourceTab"; + this.layoutControlGroupSourceTab.Name = "Root"; this.layoutControlGroupSourceTab.Size = new System.Drawing.Size(737, 531); this.layoutControlGroupSourceTab.TextVisible = false; // @@ -307,48 +285,23 @@ private void InitializeComponent() this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem2.TextVisible = false; // - // layoutControlItem1 - // - this.layoutControlItem1.Control = this.btnImport; - this.layoutControlItem1.CustomizationFormText = "layoutControlItem1"; - this.layoutControlItem1.Location = new System.Drawing.Point(636, 485); - this.layoutControlItem1.MaxSize = new System.Drawing.Size(81, 26); - this.layoutControlItem1.MinSize = new System.Drawing.Size(81, 26); - this.layoutControlItem1.Name = "layoutControlItem1"; - this.layoutControlItem1.Size = new System.Drawing.Size(81, 26); - this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; - this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); - this.layoutControlItem1.TextVisible = false; - // - // layoutControlItem3 - // - this.layoutControlItem3.Control = this.btnImportAll; - this.layoutControlItem3.CustomizationFormText = "layoutControlItem3"; - this.layoutControlItem3.Location = new System.Drawing.Point(554, 485); - this.layoutControlItem3.Name = "layoutControlItem3"; - this.layoutControlItem3.Size = new System.Drawing.Size(82, 26); - this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); - this.layoutControlItem3.TextVisible = false; - // - // layoutControlItem5 - // - this.layoutControlItem5.Control = this.btnSelectRange; - this.layoutControlItem5.CustomizationFormText = "layoutControlItem5"; - this.layoutControlItem5.Location = new System.Drawing.Point(0, 485); - this.layoutControlItem5.Name = "layoutControlItem5"; - this.layoutControlItem5.Size = new System.Drawing.Size(124, 26); - this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0); - this.layoutControlItem5.TextVisible = false; - // // emptySpaceItem1 // this.emptySpaceItem1.AllowHotTrack = false; - this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1"; - this.emptySpaceItem1.Location = new System.Drawing.Point(124, 485); + this.emptySpaceItem1.Location = new System.Drawing.Point(289, 485); this.emptySpaceItem1.Name = "emptySpaceItem1"; - this.emptySpaceItem1.Size = new System.Drawing.Size(430, 26); + this.emptySpaceItem1.Size = new System.Drawing.Size(166, 26); this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); // + // layoutItemSelectRange + // + this.layoutItemSelectRange.Control = this.btnSelectRange; + this.layoutItemSelectRange.Location = new System.Drawing.Point(0, 485); + this.layoutItemSelectRange.Name = "layoutItemSelectRange"; + this.layoutItemSelectRange.Size = new System.Drawing.Size(289, 26); + this.layoutItemSelectRange.TextSize = new System.Drawing.Size(0, 0); + this.layoutItemSelectRange.TextVisible = false; + // // ImportsPage // this.ImportsPage.Controls.Add(this.layoutControlTab); @@ -465,6 +418,42 @@ private void InitializeComponent() this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem4.TextVisible = false; // + // btnImportAll + // + this.btnImportAll.Location = new System.Drawing.Point(467, 497); + this.btnImportAll.Name = "btnImportAll"; + this.btnImportAll.Size = new System.Drawing.Size(68, 22); + this.btnImportAll.StyleController = this.layoutControlSourceTab; + this.btnImportAll.TabIndex = 10; + this.btnImportAll.Text = "btnImportAll"; + // + // layoutItemImportAll + // + this.layoutItemImportAll.Control = this.btnImportAll; + this.layoutItemImportAll.Location = new System.Drawing.Point(455, 485); + this.layoutItemImportAll.Name = "layoutItemImportAll"; + this.layoutItemImportAll.Size = new System.Drawing.Size(72, 26); + this.layoutItemImportAll.TextSize = new System.Drawing.Size(0, 0); + this.layoutItemImportAll.TextVisible = false; + // + // btnImport + // + this.btnImport.Location = new System.Drawing.Point(539, 497); + this.btnImport.Name = "btnImport"; + this.btnImport.Size = new System.Drawing.Size(186, 22); + this.btnImport.StyleController = this.layoutControlSourceTab; + this.btnImport.TabIndex = 11; + this.btnImport.Text = "btnImport"; + // + // layoutItemImport + // + this.layoutItemImport.Control = this.btnImport; + this.layoutItemImport.Location = new System.Drawing.Point(527, 485); + this.layoutItemImport.Name = "layoutItemImport"; + this.layoutItemImport.Size = new System.Drawing.Size(190, 26); + this.layoutItemImport.TextSize = new System.Drawing.Size(0, 0); + this.layoutItemImport.TextVisible = false; + // // ImporterView // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -499,10 +488,8 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.splitterItem)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutItemSelectRange)).EndInit(); this.ImportsPage.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.layoutControlTab)).EndInit(); this.layoutControlTab.ResumeLayout(false); @@ -516,6 +503,8 @@ private void InitializeComponent() this.layoutControl.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutItemImportAll)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutItemImport)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -529,16 +518,12 @@ private void InitializeComponent() private DevExpress.XtraLayout.LayoutControl layoutControlSourceTab; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroupSourceTab; private DevExpress.XtraLayout.SplitterItem splitterItem; - private DevExpress.XtraEditors.SimpleButton btnImport; - private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraEditors.PanelControl columnMappingControlPanel; private DevExpress.XtraEditors.PanelControl sourceFilePreviewControlPanel; private DevExpress.XtraEditors.PanelControl openSourceFileControlPanel; private DevExpress.XtraLayout.LayoutControlItem Preview; private DevExpress.XtraLayout.LayoutControlItem Mapping; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; - private DevExpress.XtraEditors.SimpleButton btnImportAll; private DevExpress.XtraLayout.LayoutControl layoutControl; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; @@ -550,8 +535,12 @@ private void InitializeComponent() private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraEditors.SimpleButton btnSelectRange; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutItemSelectRange; + private DevExpress.XtraEditors.SimpleButton btnImport; + private DevExpress.XtraEditors.SimpleButton btnImportAll; + private DevExpress.XtraLayout.LayoutControlItem layoutItemImportAll; + private DevExpress.XtraLayout.LayoutControlItem layoutItemImport; } } \ No newline at end of file diff --git a/src/OSPSuite.UI/Views/Importer/ImporterView.cs b/src/OSPSuite.UI/Views/Importer/ImporterView.cs index d264a6dd9..c3fb51068 100644 --- a/src/OSPSuite.UI/Views/Importer/ImporterView.cs +++ b/src/OSPSuite.UI/Views/Importer/ImporterView.cs @@ -70,12 +70,21 @@ private void changeTabs(IXtraTabPage page, IXtraTabPage prevPage) prevPage.Appearance.Header.Font = Fonts.NonSelectedTabHeaderFont; } + public override void InitializeResources() + { + base.InitializeResources(); + layoutItemSelectRange.AdjustLongButtonSize(); + layoutItemImportAll.AdjustButtonSize(); + layoutItemImport.AdjustButtonSize(); + btnSelectRange.InitWithImage(ApplicationIcons.PreviewOriginData, Captions.Importer.PreviewExcelData); + resetImportButtonText(); + } + public void StartImport(string sourceFile, ImportTableConfiguration configuration, Mode mode) { var metaDataCategories = configuration.MetaDataCategories; _mode = mode; _columnInfos = configuration.ColumnInfos; - btnSelectRange.InitWithImage(ApplicationIcons.PreviewOriginData, Captions.Importer.PreviewExcelData); var importDataTable = _importMapper.ConvertToImportDataTable(metaDataCategories, _columnInfos); diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index 6394078fe..e8a91c023 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -113,9 +113,9 @@ ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll - - False - ..\..\packages\OSPSuite.SmartXLS.2.6.2.9\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.3.1\lib\net45\SX.dll + True diff --git a/tests/OSPSuite.Core.Tests/packages.config b/tests/OSPSuite.Core.Tests/packages.config index d382f4768..e5f757b3b 100644 --- a/tests/OSPSuite.Core.Tests/packages.config +++ b/tests/OSPSuite.Core.Tests/packages.config @@ -15,7 +15,7 @@ - + \ No newline at end of file From 27f64db15db7a299b8dd624816d57900e5d8e8fd Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 13 Apr 2017 11:24:32 -0400 Subject: [PATCH 25/50] Fixes #44 startable registration. Also defines a constant for default chart template (#45) --- src/OSPSuite.Core/Domain/Constants.cs | 1 + .../OSPSuiteRegistrationConvention.cs | 5 ++ .../PresentationRegister.cs | 5 +- .../Charts/ChartEditorAndDisplayPresenter.cs | 48 ++++++++----------- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/src/OSPSuite.Core/Domain/Constants.cs b/src/OSPSuite.Core/Domain/Constants.cs index 278936fa2..a5be19a8d 100644 --- a/src/OSPSuite.Core/Domain/Constants.cs +++ b/src/OSPSuite.Core/Domain/Constants.cs @@ -45,6 +45,7 @@ public static class Constants public const int DEFAULT_TEMPLATE_WARNING_THRESHOLD = 10; public const double DEFAULT_SCALE_DIVISOR = 1; public const double DEFAULT_SCALE_DIVISOR_MIN_VALUE = 1e-15; + public const string DEFAULT_CHART_LAYOUT = "Standard View"; public const string VOLUME_ALIAS = "V"; public const string START_VALUE_ALIAS = "StartValue"; diff --git a/src/OSPSuite.Core/OSPSuiteRegistrationConvention.cs b/src/OSPSuite.Core/OSPSuiteRegistrationConvention.cs index 2fae6ee98..dee909b5e 100644 --- a/src/OSPSuite.Core/OSPSuiteRegistrationConvention.cs +++ b/src/OSPSuite.Core/OSPSuiteRegistrationConvention.cs @@ -1,7 +1,9 @@ using System; using System.Linq; +using OSPSuite.Utility; using OSPSuite.Utility.Container; using OSPSuite.Utility.Container.Conventions; +using OSPSuite.Utility.Extensions; namespace OSPSuite.Core { @@ -44,6 +46,9 @@ protected virtual bool Register(Type concreteType, IContainer container, LifeSty if (!serviceTypes.Any()) return false; + if (concreteType.IsAnImplementationOf()) + serviceTypes.Add(typeof(IStartable)); + container.Register(serviceTypes, concreteType, lifeStyle); return true; diff --git a/src/OSPSuite.Presentation/PresentationRegister.cs b/src/OSPSuite.Presentation/PresentationRegister.cs index 79864e8c8..b02fa25ec 100644 --- a/src/OSPSuite.Presentation/PresentationRegister.cs +++ b/src/OSPSuite.Presentation/PresentationRegister.cs @@ -12,6 +12,7 @@ using OSPSuite.Presentation.Services.Charts; using OSPSuite.Presentation.Settings; using OSPSuite.Presentation.UICommands; +using OSPSuite.Utility; using OSPSuite.Utility.Container; namespace OSPSuite.Presentation @@ -66,9 +67,9 @@ public override void RegisterInContainer(IContainer container) container.Register(typeof(IParameterToParameterDTOInContainerMapper<>), typeof(ParameterToParameterDTOInContainerMapper<>)); container.Register(typeof(ICloneObjectBasePresenter<>), typeof(CloneObjectBasePresenter<>)); - //SINGLETON + //SINGLETONS container.Register(LifeStyle.Singleton); - container.Register(LifeStyle.Singleton); + container.Register(LifeStyle.Singleton); container.Register(LifeStyle.Singleton); container.Register(LifeStyle.Singleton); container.Register(LifeStyle.Singleton); diff --git a/src/OSPSuite.Presentation/Presenters/Charts/ChartEditorAndDisplayPresenter.cs b/src/OSPSuite.Presentation/Presenters/Charts/ChartEditorAndDisplayPresenter.cs index 4cf814ad1..bbd77e938 100644 --- a/src/OSPSuite.Presentation/Presenters/Charts/ChartEditorAndDisplayPresenter.cs +++ b/src/OSPSuite.Presentation/Presenters/Charts/ChartEditorAndDisplayPresenter.cs @@ -2,7 +2,6 @@ using System.Windows.Forms; using OSPSuite.Assets; using OSPSuite.Core; -using OSPSuite.Utility.Extensions; using OSPSuite.Core.Domain.Data; using OSPSuite.Presentation.Charts; using OSPSuite.Presentation.Core; @@ -10,6 +9,7 @@ using OSPSuite.Presentation.Services.Charts; using OSPSuite.Presentation.Settings; using OSPSuite.Presentation.Views.Charts; +using OSPSuite.Utility.Extensions; namespace OSPSuite.Presentation.Presenters.Charts { @@ -32,7 +32,8 @@ public interface IChartEditorAndDisplayPresenter : ICommandCollectorPresenter void SetCurveNameDefinition(Func curveNameDefinition); /// - /// If no curves have been added to the chart, then text will appear in place of the empty chart + /// If no curves have been added to the chart, then text will appear in place of the empty + /// chart /// void SetNoCurvesSelectedHint(string hint); @@ -43,12 +44,10 @@ public interface IChartEditorAndDisplayPresenter : ICommandCollectorPresenter public class ChartEditorAndDisplayPresenter : AbstractCommandCollectorPresenter, IChartEditorAndDisplayPresenter { private readonly IChartEditorAndDisplayControl _chartEditorAndDisplayControl; - private readonly IChartEditorPresenter _chartEditorPresenter; - private readonly IChartDisplayPresenter _chartDisplayPresenter; private readonly IChartEditorLayoutTask _chartEditorLayoutTask; private readonly IStartOptions _startOptions; private readonly IPresentationUserSettings _presentationUserSettings; - public Action PostEditorLayout { get; set; } = () => {}; + public Action PostEditorLayout { get; set; } = () => { }; public ChartEditorAndDisplayPresenter(IChartEditorAndDisplayControl chartEditorAndDisplayControl, IChartDisplayPresenter chartDisplayPresenter, IChartEditorPresenter chartEditorPresenter, IChartEditorLayoutTask chartEditorLayoutTask, IStartOptions startOptions, @@ -56,43 +55,33 @@ public ChartEditorAndDisplayPresenter(IChartEditorAndDisplayControl chartEditorA : base(chartEditorAndDisplayControl) { _chartEditorAndDisplayControl = chartEditorAndDisplayControl; - _chartDisplayPresenter = chartDisplayPresenter; - _chartEditorPresenter = chartEditorPresenter; + DisplayPresenter = chartDisplayPresenter; + EditorPresenter = chartEditorPresenter; _chartEditorLayoutTask = chartEditorLayoutTask; _startOptions = startOptions; _presentationUserSettings = presentationUserSettings; - _chartEditorAndDisplayControl.AddDisplay(_chartDisplayPresenter.Control); - _chartEditorAndDisplayControl.AddEditor(_chartEditorPresenter.View); - - AddSubPresenters(_chartEditorPresenter, chartDisplayPresenter); + _chartEditorAndDisplayControl.AddDisplay(DisplayPresenter.Control); + _chartEditorAndDisplayControl.AddEditor(EditorPresenter.View); + AddSubPresenters(EditorPresenter, chartDisplayPresenter); } - public Control Control - { - get { return _chartEditorAndDisplayControl as Control; } - } + public Control Control => _chartEditorAndDisplayControl as Control; public void SetCurveNameDefinition(Func curveNameDefinition) { - _chartDisplayPresenter.SetCurveNameDefinition(curveNameDefinition); - _chartEditorPresenter.SetCurveNameDefinition(curveNameDefinition); + DisplayPresenter.SetCurveNameDefinition(curveNameDefinition); + EditorPresenter.SetCurveNameDefinition(curveNameDefinition); } public void SetNoCurvesSelectedHint(string hint) { - _chartDisplayPresenter.SetNoCurvesSelectedHint(hint); + DisplayPresenter.SetNoCurvesSelectedHint(hint); } - public IChartDisplayPresenter DisplayPresenter - { - get { return _chartDisplayPresenter; } - } + public IChartDisplayPresenter DisplayPresenter { get; } - public IChartEditorPresenter EditorPresenter - { - get { return _chartEditorPresenter; } - } + public IChartEditorPresenter EditorPresenter { get; } public void CopySettingsFrom(ChartEditorAndDisplaySettings settings) { @@ -101,7 +90,8 @@ public void CopySettingsFrom(ChartEditorAndDisplaySettings settings) public void CopySettingsFrom(ChartEditorAndDisplaySettings settings, bool loadEditorLayout, bool loadColumnSettings) { - _chartEditorPresenter.CopySettingsFrom(settings.EditorSettings, loadEditorLayout, loadColumnSettings); + if (settings == null) return; + EditorPresenter.CopySettingsFrom(settings.EditorSettings, loadEditorLayout, loadColumnSettings); _chartEditorAndDisplayControl.LoadLayoutFromString(settings.DockingLayout); } @@ -109,7 +99,7 @@ public ChartEditorAndDisplaySettings CreateSettings() { return new ChartEditorAndDisplaySettings { - EditorSettings = _chartEditorPresenter.CreateSettings(), + EditorSettings = EditorPresenter.CreateSettings(), DockingLayout = _chartEditorAndDisplayControl.SaveLayoutToString() }; } @@ -141,7 +131,7 @@ public IMenuBarItem ChartLayoutButton if (_startOptions.IsDeveloperMode) { chartLayoutButton.AddItem(CreateMenuButton.WithCaption(MenuNames.CustomizeEditorLayout) - .WithActionCommand(_chartEditorPresenter.ShowCustomizationForm) + .WithActionCommand(EditorPresenter.ShowCustomizationForm) .AsGroupStarter() .ForDeveloper()); From 783d8c42ee11e3bfdc7c9d7401a9519f35e35485 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 13 Apr 2017 16:07:48 -0400 Subject: [PATCH 26/50] Fixes #47 update devexpress (#48) --- src/OSPSuite.Assets/OSPSuite.Assets.csproj | 7 +- src/OSPSuite.Assets/UIConstants.cs | 28 ++-- src/OSPSuite.Assets/packages.config | 2 +- .../Commands/Core/RollBackException.cs | 18 +-- src/OSPSuite.Core/Domain/AliasCreator.cs | 4 +- .../Domain/Builder/StartValue.cs | 2 +- src/OSPSuite.Core/Domain/Exceptions.cs | 15 +- .../Domain/Formulas/DynamicFormula.cs | 6 +- .../Domain/Formulas/FormulaFactory.cs | 2 +- .../MPFitLevenbergMarquardtOptimizer.cs | 2 +- .../ConcentrationBasedFormulaUpdater.cs | 2 +- .../Domain/Services/ContainerTask.cs | 2 +- .../Domain/Services/ModelReportCreator.cs | 2 +- .../Domain/UnitSystem/MergedDimensionFor.cs | 2 +- src/OSPSuite.Core/Journal/JournalException.cs | 2 +- .../Journal/JournalSearchContextFinder.cs | 2 +- src/OSPSuite.Core/OSPSuite.Core.csproj | 5 +- src/OSPSuite.Core/packages.config | 2 +- .../NextAvailableJournalPageIndexQuery.cs | 2 +- .../OSPSuite.Infrastructure.csproj | 5 +- .../Serialization/DapperDatabase.cs | 8 +- src/OSPSuite.Infrastructure/packages.config | 2 +- .../OSPSuite.Presentation.csproj | 17 ++- src/OSPSuite.Presentation/packages.config | 4 +- src/OSPSuite.UI/Binders/AxisAdapter.cs | 2 +- src/OSPSuite.UI/OSPSuite.UI.csproj | 143 +++++++++--------- src/OSPSuite.UI/packages.config | 8 +- .../Core/BinIntervalsCreatorSpecs.cs | 2 +- .../Core/DataColumnLoader.cs | 2 +- .../Core/ModelConstructorIntegrationTests.cs | 2 +- .../UnitTestContextSpecificationSpecs.cs | 2 +- .../OSPSuite.Core.Tests.csproj | 13 +- tests/OSPSuite.Core.Tests/packages.config | 4 +- .../OSPSuite.Starter/OSPSuite.Starter.csproj | 142 ++++++++--------- tests/OSPSuite.Starter/packages.config | 8 +- .../OSPSuite.UI.Tests.csproj | 137 ++++++++--------- tests/OSPSuite.UI.Tests/app.config | 20 +++ tests/OSPSuite.UI.Tests/packages.config | 6 +- 38 files changed, 326 insertions(+), 308 deletions(-) diff --git a/src/OSPSuite.Assets/OSPSuite.Assets.csproj b/src/OSPSuite.Assets/OSPSuite.Assets.csproj index b1b53c565..abcfdd1ba 100644 --- a/src/OSPSuite.Assets/OSPSuite.Assets.csproj +++ b/src/OSPSuite.Assets/OSPSuite.Assets.csproj @@ -34,8 +34,9 @@ 4 - - ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll + + ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll + True @@ -71,8 +72,8 @@ - + diff --git a/src/OSPSuite.Assets/UIConstants.cs b/src/OSPSuite.Assets/UIConstants.cs index 5a6c5fb54..e0950cce2 100644 --- a/src/OSPSuite.Assets/UIConstants.cs +++ b/src/OSPSuite.Assets/UIConstants.cs @@ -193,7 +193,7 @@ public static string ReallyDeleteAllObservedData(IEnumerable anythingNot public static string CloneObjectBase(string entityType, string name) { - return "New name for the cloned {0} '{1}'".FormatWith(entityType, name); + return $"New name for the cloned {entityType} '{name}'"; } public static string ContactSupport(string forumUrl) @@ -203,17 +203,17 @@ public static string ContactSupport(string forumUrl) public static string CreatedOn(string creationDate) { - return "Created on {0}".FormatWith(creationDate); + return $"Created on {creationDate}"; } public static string ClonedOn(string creationDate, string clonedFrom) { - return "Cloned from '{0}' on {1}".FormatWith(clonedFrom, creationDate); + return $"Cloned from '{clonedFrom}' on {creationDate}"; } public static string ConfiguredOn(string creationDate) { - return "Configured on {0}".FormatWith(creationDate); + return $"Configured on {creationDate}"; } public static string ChartFingerprintDataFrom(string projectName, string simulationName, string dateString) @@ -259,12 +259,12 @@ public static string ExceptionViewDescription(string issueTrackerUrl) public static string EnterNameEntityCaption(string type) { - return "Enter name for {0}".FormatWith(type, type); + return $"Enter name for {type}"; } public static string RenameEntityCaption(string type, string name) { - return "New name for {0} '{1}'".FormatWith(type, name); + return $"New name for {type} '{name}'"; } public static class Importer @@ -442,12 +442,12 @@ public static string ExportRelatedItemToFileFilter(string defaultFileExtension) public static string CreatedAtBy(string formattedDate, string by) { - return "Created on {0} by {1}".FormatWith(formattedDate, by); + return $"Created on {formattedDate} by {by}"; } public static string UpdatedAtBy(string formattedDate, string by) { - return "Last updated on {0} by {1}".FormatWith(formattedDate, by); + return $"Last updated on {formattedDate} by {by}"; } public static readonly string ReallyDeleteMultipleRelatedItems = "Really delete Related Items?"; @@ -1284,7 +1284,7 @@ public static class MPFit public static readonly string InitialConstraintsInconsistent = "Initial constraints inconsistent"; public static readonly string NotEnoughDegreesOfFreedom = "Not enough degrees of freedom"; public static readonly string ErrorObjectiveFunction = "Error in objective function: {0}"; - public static readonly string UnknownStatus = "Unknown status: {0}"; + public static string UnknownStatus(string status) => $"Unknown status: {status}"; public static readonly string GeneralInputError = "General input error"; public static string OptimizationFailed(string error) => $"Levenberg-Marquardt optimization failed: {error}"; } @@ -1370,22 +1370,22 @@ public static string ValueGreaterThanMinSizeInPixelAndLessThanMaxSizeIsRequiredO public static string ValueSmallerThanMax(string parameterName, string value, string unit) { - return "Value for {0} should be less than or equal to {1} {2}".FormatWith(parameterName, value, unit); + return $"Value for {parameterName} should be less than or equal to {value} {unit}"; } public static string ValueBiggerThanMin(string parameterName, string value, string unit) { - return "Value for {0} should be greater than or equal to {1} {2}".FormatWith(parameterName, value, unit); + return $"Value for {parameterName} should be greater than or equal to {value} {unit}"; } public static string ValueStrictBiggerThanMin(string parameterName, string value, string unit) { - return "Value for {0} should be strictly greater than {1} {2}".FormatWith(parameterName, value, unit); + return $"Value for {parameterName} should be strictly greater than {value} {unit}"; } public static string ValueStrictSmallerThanMax(string parameterName, string value, string unit) { - return "Value for {0} should be strictly less than {1} {2}".FormatWith(parameterName, value, unit); + return $"Value for {parameterName} should be strictly less than {value} {unit}"; } public static string StartValueDefinedForNonPhysicalContainer(string moleculeName, string containerPath) @@ -1606,7 +1606,7 @@ public static class Command public static string CreateProjectDescription(string version) { - return "Project started with version {0}".FormatWith(version); + return $"Project started with version {version}"; } public static string SetMetaDataAddedCommandDescripton(string name, string value) diff --git a/src/OSPSuite.Assets/packages.config b/src/OSPSuite.Assets/packages.config index 6f059cc79..e713772d6 100644 --- a/src/OSPSuite.Assets/packages.config +++ b/src/OSPSuite.Assets/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/OSPSuite.Core/Commands/Core/RollBackException.cs b/src/OSPSuite.Core/Commands/Core/RollBackException.cs index 816d8f273..ebb8a37b5 100644 --- a/src/OSPSuite.Core/Commands/Core/RollBackException.cs +++ b/src/OSPSuite.Core/Commands/Core/RollBackException.cs @@ -1,16 +1,12 @@ using OSPSuite.Utility.Exceptions; -using OSPSuite.Utility.Extensions; namespace OSPSuite.Core.Commands.Core { - public class RollBackException: OSPSuiteException - { - private const string _rollBackCommandExceptionMessage = "Cannot perform Rollback for irreversible action: '{0}'"; - - public RollBackException(ICommand command) - : base(_rollBackCommandExceptionMessage.FormatWith(command.Description)) - { - - } - } + public class RollBackException : OSPSuiteException + { + public RollBackException(ICommand command) + : base($"Cannot perform Rollback for irreversible action: '{command.Description}'") + { + } + } } \ No newline at end of file diff --git a/src/OSPSuite.Core/Domain/AliasCreator.cs b/src/OSPSuite.Core/Domain/AliasCreator.cs index c92f22718..83c9dc9a5 100644 --- a/src/OSPSuite.Core/Domain/AliasCreator.cs +++ b/src/OSPSuite.Core/Domain/AliasCreator.cs @@ -43,7 +43,7 @@ public string CreateAliasFrom(string name, IEnumerable forbiddenAliases) int i = 1; while (forbiddenAliases.ContainsItem(alias)) { - alias = string.Format("{0}{1}", baseAlias, i++); + alias = $"{baseAlias}{i++}"; } return alias; } @@ -53,7 +53,7 @@ private string checkForNumeric(string name) double d; if(double.TryParse(name, out d)) { - return string.Format("_{0}", name); + return $"_{name}"; } return name; } diff --git a/src/OSPSuite.Core/Domain/Builder/StartValue.cs b/src/OSPSuite.Core/Domain/Builder/StartValue.cs index f2ad75e11..85aacdabe 100644 --- a/src/OSPSuite.Core/Domain/Builder/StartValue.cs +++ b/src/OSPSuite.Core/Domain/Builder/StartValue.cs @@ -189,7 +189,7 @@ public override void UpdatePropertiesFrom(IUpdatable source, ICloneManager clone public override string ToString() { - return string.Format("Path={0}, Name={1}", ContainerPath, Name); + return $"Path={ContainerPath}, Name={Name}"; } } } \ No newline at end of file diff --git a/src/OSPSuite.Core/Domain/Exceptions.cs b/src/OSPSuite.Core/Domain/Exceptions.cs index 5e7fa7670..d70f9ae23 100644 --- a/src/OSPSuite.Core/Domain/Exceptions.cs +++ b/src/OSPSuite.Core/Domain/Exceptions.cs @@ -1,12 +1,10 @@ using System; using OSPSuite.Assets; -using OSPSuite.Utility.Exceptions; -using OSPSuite.Utility.Extensions; using OSPSuite.Core.Domain.Formulas; +using OSPSuite.Utility.Exceptions; namespace OSPSuite.Core.Domain { - public class BothNeighborsSatisfyingCriteriaException : OSPSuiteException { public BothNeighborsSatisfyingCriteriaException(INeighborhood neighborhood) : base(Error.BothNeighborsSatisfying(neighborhood.Name)) @@ -16,19 +14,14 @@ public BothNeighborsSatisfyingCriteriaException(INeighborhood neighborhood) : ba public class NotUniqueIdException : ArgumentException { - private static string ERROR_MESSAGE = "Id {0} not unique"; - - public NotUniqueIdException(string id) - : base(string.Format(ERROR_MESSAGE, id)) + public NotUniqueIdException(string id) : base($"Id {id} not unique") { } } public class NotUniqueNameException : OSPSuiteException { - private const string _errorMessage = "Name '{0}' is not unique in parent container '{1}'"; - - public NotUniqueNameException(string childName, string containerName) : this(_errorMessage.FormatWith(childName, containerName)) + public NotUniqueNameException(string childName, string containerName) : this($"Name '{childName}' is not unique in parent container '{containerName}'") { } @@ -41,7 +34,7 @@ public NotUniqueNameException(string message) public class ValuePointAlreadyExistsForPointException : OSPSuiteException { public ValuePointAlreadyExistsForPointException(ValuePoint point) - : base(string.Format("A point for x={0} was already added with y={1}", point.X, point.Y)) + : base($"A point for x={point.X} was already added with y={point.Y}") { } } diff --git a/src/OSPSuite.Core/Domain/Formulas/DynamicFormula.cs b/src/OSPSuite.Core/Domain/Formulas/DynamicFormula.cs index bc985242b..6f7ec46bf 100644 --- a/src/OSPSuite.Core/Domain/Formulas/DynamicFormula.cs +++ b/src/OSPSuite.Core/Domain/Formulas/DynamicFormula.cs @@ -50,7 +50,7 @@ protected override double CalculateFor(IEnumerable usedObjects /// public string VariablePattern { - get { return string.Format("{0}_{1}", Variable, _iterationPattern); } + get { return $"{Variable}_{_iterationPattern}"; } } /// @@ -83,8 +83,8 @@ public IFormula ExpandUsing(IReadOnlyList allFormulaUsable, IObj private void addDynamicVariablesToFormula(ExplicitFormula explicitFormula, StringBuilder stringBuilder, IFormulaUsable formulaUsable, int index0, IObjectPathFactory objectPathFactory) { - string index1 = string.Format("{0}", index0 + 1); - string currentVariable = string.Format("{0}_{1}", Variable, index1); + string index1 = $"{index0 + 1}"; + string currentVariable = $"{Variable}_{index1}"; //replace current variable in formula string and add reference to the explicit formula string formulaStringPart = FormulaString.Replace(VariablePattern, currentVariable); diff --git a/src/OSPSuite.Core/Domain/Formulas/FormulaFactory.cs b/src/OSPSuite.Core/Domain/Formulas/FormulaFactory.cs index e6b41e979..dd63002d5 100644 --- a/src/OSPSuite.Core/Domain/Formulas/FormulaFactory.cs +++ b/src/OSPSuite.Core/Domain/Formulas/FormulaFactory.cs @@ -80,7 +80,7 @@ public IFormula CreateMoleculeAmountReferenceToStartValue(IParameter startValueP { var formula = startValueParameter.IsAmountBased() ? createReferenceStartValueFormula(Constants.START_VALUE_ALIAS, Constants.MOLECULE_CONCENTRATION_IN_AMOUNT_FORMULA) - : createReferenceStartValueFormula(string.Format("{0} * {1}", Constants.START_VALUE_ALIAS, Constants.VOLUME_ALIAS), Constants.MOLECULE_AMOUNT_FORMULA); + : createReferenceStartValueFormula($"{Constants.START_VALUE_ALIAS} * {Constants.VOLUME_ALIAS}", Constants.MOLECULE_AMOUNT_FORMULA); formula.AddObjectPath(_objectPathFactory.CreateFormulaUsablePathFrom(Constants.Parameters.START_VALUE) .WithAlias(Constants.START_VALUE_ALIAS) diff --git a/src/OSPSuite.Core/Domain/ParameterIdentifications/Algorithms/MPFitLevenbergMarquardtOptimizer.cs b/src/OSPSuite.Core/Domain/ParameterIdentifications/Algorithms/MPFitLevenbergMarquardtOptimizer.cs index 670e7d295..0c7e37a31 100644 --- a/src/OSPSuite.Core/Domain/ParameterIdentifications/Algorithms/MPFitLevenbergMarquardtOptimizer.cs +++ b/src/OSPSuite.Core/Domain/ParameterIdentifications/Algorithms/MPFitLevenbergMarquardtOptimizer.cs @@ -132,7 +132,7 @@ private void evaluateStatus(int status) errorMsg = Error.MPFit.NotEnoughDegreesOfFreedom; break; default: - errorMsg = Error.MPFit.UnknownStatus.FormatWith(status); + errorMsg = Error.MPFit.UnknownStatus(status.ToString()); break; } diff --git a/src/OSPSuite.Core/Domain/Services/ConcentrationBasedFormulaUpdater.cs b/src/OSPSuite.Core/Domain/Services/ConcentrationBasedFormulaUpdater.cs index c3c2bde9b..d6c66be7b 100644 --- a/src/OSPSuite.Core/Domain/Services/ConcentrationBasedFormulaUpdater.cs +++ b/src/OSPSuite.Core/Domain/Services/ConcentrationBasedFormulaUpdater.cs @@ -58,7 +58,7 @@ private ExplicitFormula updateFormulaToAmountBase(IFormula originalFormula, IDim formulaInAmount.Dimension = amountDimension; var volumeAlias = _formulaTask.AddParentVolumeReferenceToFormula(formulaInAmount); - formulaInAmount.FormulaString = string.Format("({0})*{1}", formulaInAmount.FormulaString, volumeAlias); + formulaInAmount.FormulaString = $"({formulaInAmount.FormulaString})*{volumeAlias}"; return formulaInAmount; } diff --git a/src/OSPSuite.Core/Domain/Services/ContainerTask.cs b/src/OSPSuite.Core/Domain/Services/ContainerTask.cs index ace098101..7fc4c4f5e 100644 --- a/src/OSPSuite.Core/Domain/Services/ContainerTask.cs +++ b/src/OSPSuite.Core/Domain/Services/ContainerTask.cs @@ -140,7 +140,7 @@ public string CreateUniqueName(IReadOnlyList usedNames, string baseName, .Select(n => n.Substring(baseFormat.Length)); //try to convert them to an int - return string.Format("{0}{1}", baseFormat, getNextAvailableIndexBasedOn(allUsedNamesMatchingBaseFormat)); + return $"{baseFormat}{getNextAvailableIndexBasedOn(allUsedNamesMatchingBaseFormat)}"; } private int getNextAvailableIndexBasedOn(IEnumerable allUsedNamesMatchingBaseFormat) diff --git a/src/OSPSuite.Core/Domain/Services/ModelReportCreator.cs b/src/OSPSuite.Core/Domain/Services/ModelReportCreator.cs index c70d90d5b..508ce0e4f 100644 --- a/src/OSPSuite.Core/Domain/Services/ModelReportCreator.cs +++ b/src/OSPSuite.Core/Domain/Services/ModelReportCreator.cs @@ -345,7 +345,7 @@ private static string getUnit(IDimension dimension) string unit = dimension.BaseUnit.Name; if (!string.IsNullOrEmpty(unit)) - unit = string.Format(" [{0}]", unit); + unit = $" [{unit}]"; return unit; } diff --git a/src/OSPSuite.Core/Domain/UnitSystem/MergedDimensionFor.cs b/src/OSPSuite.Core/Domain/UnitSystem/MergedDimensionFor.cs index aca887205..763b17e50 100644 --- a/src/OSPSuite.Core/Domain/UnitSystem/MergedDimensionFor.cs +++ b/src/OSPSuite.Core/Domain/UnitSystem/MergedDimensionFor.cs @@ -185,7 +185,7 @@ public class UnableToResolveParametersException : OSPSuiteException public Unit Unit { get; private set; } public string UnableToResolveParametersMessage { get; private set; } - public UnableToResolveParametersException(Unit unit, string unableToResolveParametersMessage) : base(string.Format("Unable to convert to {0}.\n{1}", unit.Name, unableToResolveParametersMessage)) + public UnableToResolveParametersException(Unit unit, string unableToResolveParametersMessage) : base($"Unable to convert to {unit.Name}.\n{unableToResolveParametersMessage}") { Unit = unit; UnableToResolveParametersMessage = unableToResolveParametersMessage; diff --git a/src/OSPSuite.Core/Journal/JournalException.cs b/src/OSPSuite.Core/Journal/JournalException.cs index 71eb31ea9..e7e0fb7f8 100644 --- a/src/OSPSuite.Core/Journal/JournalException.cs +++ b/src/OSPSuite.Core/Journal/JournalException.cs @@ -20,7 +20,7 @@ public JournalException(string message, Exception innerException) : base(message public class CannotCreateNewItemForPersitedEntity : JournalException { - public CannotCreateNewItemForPersitedEntity(string id) : base("Cannot create a new item for an existing id: {0}".FormatWith(id)) + public CannotCreateNewItemForPersitedEntity(string id) : base($"Cannot create a new item for an existing id: {id}") { } } diff --git a/src/OSPSuite.Core/Journal/JournalSearchContextFinder.cs b/src/OSPSuite.Core/Journal/JournalSearchContextFinder.cs index c6071c671..b23e8f8e3 100644 --- a/src/OSPSuite.Core/Journal/JournalSearchContextFinder.cs +++ b/src/OSPSuite.Core/Journal/JournalSearchContextFinder.cs @@ -64,7 +64,7 @@ private string createSearchPattern(string searchPattern) { var escapedPattern = Regex.Escape(searchPattern); return "(?(?:\\S+\\s){0," + CONTEXT_WORD_COUNT + "}\\S*)?" + //up to CONTEXT_WORD_COUNT words BEFORE the match - "(?{0})".FormatWith(escapedPattern) + //actual match + $"(?{escapedPattern})"+ //actual match "(?\\S*(?:\\s\\S+){0," + CONTEXT_WORD_COUNT + "})?"; //up to CONTEXT_WORD_COUNT words AFTER the match } diff --git a/src/OSPSuite.Core/OSPSuite.Core.csproj b/src/OSPSuite.Core/OSPSuite.Core.csproj index 888bee1c2..f2d918700 100644 --- a/src/OSPSuite.Core/OSPSuite.Core.csproj +++ b/src/OSPSuite.Core/OSPSuite.Core.csproj @@ -80,8 +80,9 @@ False ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll - - ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll + + ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll + True diff --git a/src/OSPSuite.Core/packages.config b/src/OSPSuite.Core/packages.config index 1f0a94fe3..0778d23ce 100644 --- a/src/OSPSuite.Core/packages.config +++ b/src/OSPSuite.Core/packages.config @@ -6,5 +6,5 @@ - + \ No newline at end of file diff --git a/src/OSPSuite.Infrastructure/Journal/Queries/NextAvailableJournalPageIndexQuery.cs b/src/OSPSuite.Infrastructure/Journal/Queries/NextAvailableJournalPageIndexQuery.cs index 3781f541a..e8f272d8d 100644 --- a/src/OSPSuite.Infrastructure/Journal/Queries/NextAvailableJournalPageIndexQuery.cs +++ b/src/OSPSuite.Infrastructure/Journal/Queries/NextAvailableJournalPageIndexQuery.cs @@ -15,7 +15,7 @@ public NextAvailableJournalPageIndexQuery(IJournalSession journalSession) : base public override int Query(NextAvailableJournalPageIndex query) { - var sql = "SELECT MAX(UniqueIndex) as UniqueIndex FROM {0}".FormatWith(Db.JournalPages.TableName); + var sql = $"SELECT MAX(UniqueIndex) as UniqueIndex FROM {Db.JournalPages.TableName}"; var dataRow = Db.Connection.ExecuteQueryForSingleRow(sql); return dataRow.ValueAt("UniqueIndex") + 1; } diff --git a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj index fe4aff88f..c571970ab 100644 --- a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj +++ b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj @@ -76,8 +76,9 @@ False ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll - - ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll + + ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll + True ..\..\packages\OSPSuite.SmartXLS.2.6.3.1\lib\net45\SX.dll diff --git a/src/OSPSuite.Infrastructure/Serialization/DapperDatabase.cs b/src/OSPSuite.Infrastructure/Serialization/DapperDatabase.cs index 18ba44445..29cec03af 100644 --- a/src/OSPSuite.Infrastructure/Serialization/DapperDatabase.cs +++ b/src/OSPSuite.Infrastructure/Serialization/DapperDatabase.cs @@ -117,7 +117,7 @@ public bool Delete(TId id) /// public bool DeleteWhere(string deleteCondition, dynamic data) { - return _database.Execute("DELETE FROM " + TableName + " WHERE {0}".FormatWith(deleteCondition), data) > 0; + return _database.Execute($"DELETE FROM {TableName} WHERE {deleteCondition}", data) > 0; } /// @@ -132,17 +132,17 @@ public T Get(TId id) public IEnumerable GetWhere(string getCondition, dynamic data) { - return _database.DoInConnection(() => _database.Query("SELECT * FROM " + TableName + " WHERE {0}".FormatWith(getCondition), data)); + return _database.DoInConnection(() => _database.Query($"SELECT * FROM {TableName} WHERE {getCondition}", data)); } public T First() { - return _database.DoInConnection(() => _database.Query("SELECT * FROM " + TableName + " LIMIT 1").FirstOrDefault()); + return _database.DoInConnection(() => _database.Query($"SELECT * FROM {TableName} LIMIT 1").FirstOrDefault()); } public IEnumerable All() { - return _database.DoInConnection(() => _database.Query("SELECT * FROM " + TableName)); + return _database.DoInConnection(() => _database.Query($"SELECT * FROM {TableName}")); } private static readonly ConcurrentDictionary> paramNameCache = new ConcurrentDictionary>(); diff --git a/src/OSPSuite.Infrastructure/packages.config b/src/OSPSuite.Infrastructure/packages.config index 7ea49cc45..11b01e00e 100644 --- a/src/OSPSuite.Infrastructure/packages.config +++ b/src/OSPSuite.Infrastructure/packages.config @@ -10,7 +10,7 @@ - + \ No newline at end of file diff --git a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj index e0087890c..98f7ad263 100644 --- a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj +++ b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj @@ -34,13 +34,13 @@ 4 - - False - ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.4\lib\net452\DevExpress.Data.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.6\lib\net452\DevExpress.Data.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.4\lib\net452\DevExpress.Utils.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.6\lib\net452\DevExpress.Utils.v16.2.dll + True ..\..\packages\OSPSuite.Serializer.2.0.0.1\lib\net45\OSPSuite.Serializer.dll @@ -48,8 +48,9 @@ ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll - - ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll + + ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll + True ..\..\packages\OSPSuite.SmartXLS.2.6.3.1\lib\net45\SX.dll diff --git a/src/OSPSuite.Presentation/packages.config b/src/OSPSuite.Presentation/packages.config index 2d2779627..849ac887f 100644 --- a/src/OSPSuite.Presentation/packages.config +++ b/src/OSPSuite.Presentation/packages.config @@ -1,8 +1,8 @@  - + - + \ No newline at end of file diff --git a/src/OSPSuite.UI/Binders/AxisAdapter.cs b/src/OSPSuite.UI/Binders/AxisAdapter.cs index 48a1ae2bd..92fdfa8db 100644 --- a/src/OSPSuite.UI/Binders/AxisAdapter.cs +++ b/src/OSPSuite.UI/Binders/AxisAdapter.cs @@ -261,7 +261,7 @@ private void setLabels() switch (Axis.NumberMode) { case NumberModes.Scientific: - pattern = "V:E{0}".FormatWith(_numericFormatterOptions.DecimalPlace); + pattern = $"V:E{_numericFormatterOptions.DecimalPlace}"; break; case NumberModes.Normal: pattern = "V:G"; diff --git a/src/OSPSuite.UI/OSPSuite.UI.csproj b/src/OSPSuite.UI/OSPSuite.UI.csproj index c0abc4c5e..1dc14cfea 100644 --- a/src/OSPSuite.UI/OSPSuite.UI.csproj +++ b/src/OSPSuite.UI/OSPSuite.UI.csproj @@ -49,93 +49,93 @@ 4 - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.BonusSkins.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.BonusSkins.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.Charts.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.Charts.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.4\lib\net452\DevExpress.Data.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.6\lib\net452\DevExpress.Data.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.Office.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.Office.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.PivotGrid.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.PivotGrid.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.Printing.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.Printing.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.RichEdit.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.RichEdit.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.4\lib\net452\DevExpress.Utils.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.6\lib\net452\DevExpress.Utils.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraBars.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraBars.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraCharts.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraCharts.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraCharts.v16.2.UI.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraCharts.v16.2.UI.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraCharts.v16.2.Wizard.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraCharts.v16.2.Wizard.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraEditors.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraEditors.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraGrid.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraGrid.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraLayout.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraLayout.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraNavBar.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraNavBar.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraPivotGrid.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraPivotGrid.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraPrinting.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraPrinting.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraRichEdit.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraRichEdit.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraRichEdit.v16.2.Extensions.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraRichEdit.v16.2.Extensions.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraTreeList.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraTreeList.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraVerticalGrid.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraVerticalGrid.v16.2.dll + True ..\..\packages\WindowsAPICodePack-Core.1.1.2\lib\Microsoft.WindowsAPICodePack.dll @@ -160,15 +160,16 @@ ..\..\packages\OSPSuite.DataBinding.2.0.0.1\lib\net45\OSPSuite.DataBinding.dll - - False - ..\..\packages\OSPSuite.DataBinding.DevExpress.2.0.0.1\lib\net45\OSPSuite.DataBinding.DevExpress.dll + + ..\..\packages\OSPSuite.DataBinding.DevExpress.2.0.0.3\lib\net45\OSPSuite.DataBinding.DevExpress.dll + True ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll - - ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll + + ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll + True diff --git a/src/OSPSuite.UI/packages.config b/src/OSPSuite.UI/packages.config index d271c4469..e1c16c409 100644 --- a/src/OSPSuite.UI/packages.config +++ b/src/OSPSuite.UI/packages.config @@ -2,11 +2,11 @@ - - - + + + - + \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Core/BinIntervalsCreatorSpecs.cs b/tests/OSPSuite.Core.Tests/Core/BinIntervalsCreatorSpecs.cs index 35d176f18..3f0371489 100644 --- a/tests/OSPSuite.Core.Tests/Core/BinIntervalsCreatorSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Core/BinIntervalsCreatorSpecs.cs @@ -50,7 +50,7 @@ protected void VerifyIntervalContent(int expectedNumberOfIntervals) for (int i = 0; i < orderedValues.Count / _intervals.Count; i++) { double value = orderedValues[(orderedValues.Count / _intervals.Count) * binIndex + i]; - _intervals[binIndex].Contains(value).ShouldBeTrue("BinIndex = {0}, value = {1}".FormatWith(binIndex, value)); + _intervals[binIndex].Contains(value).ShouldBeTrue($"BinIndex = {binIndex}, value = {value}"); } } } diff --git a/tests/OSPSuite.Core.Tests/Core/DataColumnLoader.cs b/tests/OSPSuite.Core.Tests/Core/DataColumnLoader.cs index 6c97d631b..e5e78a3e3 100644 --- a/tests/OSPSuite.Core.Tests/Core/DataColumnLoader.cs +++ b/tests/OSPSuite.Core.Tests/Core/DataColumnLoader.cs @@ -14,7 +14,7 @@ internal static class DataColumnLoader { public static DataColumn GetDataColumnFrom(string excelFileNameWithoutExtension) { - var fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Data\\{0}.xls".FormatWith(excelFileNameWithoutExtension)); + var fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Data\\{excelFileNameWithoutExtension}.xls"); DataTable dataTable; using (var workBook = new WorkBook()) { diff --git a/tests/OSPSuite.Core.Tests/Core/ModelConstructorIntegrationTests.cs b/tests/OSPSuite.Core.Tests/Core/ModelConstructorIntegrationTests.cs index 8ca449912..bbcd3d570 100644 --- a/tests/OSPSuite.Core.Tests/Core/ModelConstructorIntegrationTests.cs +++ b/tests/OSPSuite.Core.Tests/Core/ModelConstructorIntegrationTests.cs @@ -347,7 +347,7 @@ public void each_parameter_using_formula_defined_in_the_simulation_should_have_a var builder = _buildConfiguration.BuilderFor(entity); if (builder != null) continue; if (entity.IsNamed(Constants.NEIGHBORHOODS)) continue; - errorList.Add("No builder found for {0}".FormatWith(entity.Name)); + errorList.Add($"No builder found for {entity.Name}"); } errorList.Count.ShouldBeEqualTo(0, errorList.ToString("\n")); diff --git a/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs b/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs index fc55d3c67..cf7ca7e52 100644 --- a/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Helpers/UnitTestContextSpecificationSpecs.cs @@ -123,7 +123,7 @@ public abstract class ContextForModelConstructorIntegration : ContextForIntegrat { public SimulationTransfer LoadPKMLFile(string pkmlName) { - var projectFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Data\\{0}.pkml".FormatWith(pkmlName)); + var projectFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Data\\{pkmlName}.pkml"); return SerializationHelperForSpecs.Load(projectFile); } diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index e8a91c023..44d88e515 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -67,12 +67,12 @@ ..\..\packages\Castle.Windsor.3.4.0\lib\net45\Castle.Windsor.dll True - - ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.4\lib\net452\DevExpress.Data.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.6\lib\net452\DevExpress.Data.v16.2.dll True - - ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.4\lib\net452\DevExpress.Utils.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.6\lib\net452\DevExpress.Utils.v16.2.dll True @@ -110,8 +110,9 @@ ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll - - ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll + + ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll + True ..\..\packages\OSPSuite.SmartXLS.2.6.3.1\lib\net45\SX.dll diff --git a/tests/OSPSuite.Core.Tests/packages.config b/tests/OSPSuite.Core.Tests/packages.config index e5f757b3b..055f52339 100644 --- a/tests/OSPSuite.Core.Tests/packages.config +++ b/tests/OSPSuite.Core.Tests/packages.config @@ -10,12 +10,12 @@ - + - + \ No newline at end of file diff --git a/tests/OSPSuite.Starter/OSPSuite.Starter.csproj b/tests/OSPSuite.Starter/OSPSuite.Starter.csproj index da0aeba3c..d3fe99e48 100644 --- a/tests/OSPSuite.Starter/OSPSuite.Starter.csproj +++ b/tests/OSPSuite.Starter/OSPSuite.Starter.csproj @@ -66,93 +66,93 @@ ..\..\packages\Castle.Windsor.3.4.0\lib\net45\Castle.Windsor.dll True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.BonusSkins.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.BonusSkins.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.Charts.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.Charts.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.4\lib\net452\DevExpress.Data.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.6\lib\net452\DevExpress.Data.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.Office.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.Office.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.PivotGrid.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.PivotGrid.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.Printing.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.Printing.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.RichEdit.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.RichEdit.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.4\lib\net452\DevExpress.Utils.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.6\lib\net452\DevExpress.Utils.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraBars.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraBars.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraCharts.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraCharts.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraCharts.v16.2.UI.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraCharts.v16.2.UI.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraCharts.v16.2.Wizard.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraCharts.v16.2.Wizard.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraEditors.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraEditors.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraGrid.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraGrid.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraLayout.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraLayout.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraNavBar.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraNavBar.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraPivotGrid.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraPivotGrid.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraPrinting.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraPrinting.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraRichEdit.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraRichEdit.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraRichEdit.v16.2.Extensions.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraRichEdit.v16.2.Extensions.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraTreeList.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraTreeList.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraVerticalGrid.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraVerticalGrid.v16.2.dll + True ..\..\packages\Northwoods.GoWin.5.2.0\lib\net45\Northwoods.Go.dll @@ -185,14 +185,16 @@ ..\..\packages\OSPSuite.DataBinding.2.0.0.1\lib\net45\OSPSuite.DataBinding.dll - - ..\..\packages\OSPSuite.DataBinding.DevExpress.2.0.0.1\lib\net45\OSPSuite.DataBinding.DevExpress.dll + + ..\..\packages\OSPSuite.DataBinding.DevExpress.2.0.0.3\lib\net45\OSPSuite.DataBinding.DevExpress.dll + True ..\..\packages\OSPSuite.Serializer.2.0.0.1\lib\net45\OSPSuite.Serializer.dll - - ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll + + ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll + True diff --git a/tests/OSPSuite.Starter/packages.config b/tests/OSPSuite.Starter/packages.config index f89ada8b5..745525dc0 100644 --- a/tests/OSPSuite.Starter/packages.config +++ b/tests/OSPSuite.Starter/packages.config @@ -4,10 +4,10 @@ - - - + + + - + \ No newline at end of file diff --git a/tests/OSPSuite.UI.Tests/OSPSuite.UI.Tests.csproj b/tests/OSPSuite.UI.Tests/OSPSuite.UI.Tests.csproj index b3d1ef198..1760b0ff6 100644 --- a/tests/OSPSuite.UI.Tests/OSPSuite.UI.Tests.csproj +++ b/tests/OSPSuite.UI.Tests/OSPSuite.UI.Tests.csproj @@ -31,93 +31,93 @@ 4 - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.BonusSkins.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.BonusSkins.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.Charts.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.Charts.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.4\lib\net452\DevExpress.Data.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.6\lib\net452\DevExpress.Data.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.Office.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.Office.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.PivotGrid.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.PivotGrid.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.Printing.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.Printing.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.RichEdit.v16.2.Core.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.RichEdit.v16.2.Core.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.4\lib\net452\DevExpress.Utils.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.Presentation.16.2.6\lib\net452\DevExpress.Utils.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraBars.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraBars.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraCharts.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraCharts.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraCharts.v16.2.UI.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraCharts.v16.2.UI.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraCharts.v16.2.Wizard.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraCharts.v16.2.Wizard.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraEditors.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraEditors.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraGrid.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraGrid.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraLayout.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraLayout.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraNavBar.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraNavBar.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraPivotGrid.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraPivotGrid.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraPrinting.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraPrinting.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraRichEdit.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraRichEdit.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraRichEdit.v16.2.Extensions.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraRichEdit.v16.2.Extensions.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraTreeList.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraTreeList.v16.2.dll + True - - False - ..\..\packages\OSPSuite.DevExpress.16.2.4\lib\net452\DevExpress.XtraVerticalGrid.v16.2.dll + + ..\..\packages\OSPSuite.DevExpress.16.2.6\lib\net452\DevExpress.XtraVerticalGrid.v16.2.dll + True ..\..\packages\FakeItEasy.2.3.3\lib\net40\FakeItEasy.dll @@ -129,8 +129,9 @@ ..\..\packages\OSPSuite.BDDHelper.2.0.0.1\lib\net45\OSPSuite.BDDHelper.dll - - ..\..\packages\OSPSuite.Utility.2.0.0.1\lib\net45\OSPSuite.Utility.dll + + ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll + True diff --git a/tests/OSPSuite.UI.Tests/app.config b/tests/OSPSuite.UI.Tests/app.config index 533a9afb4..d62a591c2 100644 --- a/tests/OSPSuite.UI.Tests/app.config +++ b/tests/OSPSuite.UI.Tests/app.config @@ -10,6 +10,26 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/OSPSuite.UI.Tests/packages.config b/tests/OSPSuite.UI.Tests/packages.config index 90279bf03..6a219a73f 100644 --- a/tests/OSPSuite.UI.Tests/packages.config +++ b/tests/OSPSuite.UI.Tests/packages.config @@ -3,7 +3,7 @@ - - - + + + \ No newline at end of file From 3191588214cde8fe9e6014826ed50f6724197204 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Mon, 17 Apr 2017 12:46:29 -0400 Subject: [PATCH 27/50] Fixes #46 update icons (#49) --- src/OSPSuite.Assets/Icons/BeagleGreen.ico | Bin 17542 -> 17542 bytes src/OSPSuite.Assets/Icons/BeagleRed.ico | Bin 17542 -> 17542 bytes src/OSPSuite.Assets/Icons/MouseGreen.ico | Bin 17542 -> 17542 bytes src/OSPSuite.Assets/Icons/MouseRed.ico | Bin 17542 -> 17542 bytes src/OSPSuite.Assets/Icons/Rabbit.ico | Bin 17542 -> 17542 bytes src/OSPSuite.Assets/Icons/RabbitGreen.ico | Bin 17542 -> 17542 bytes 6 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/OSPSuite.Assets/Icons/BeagleGreen.ico b/src/OSPSuite.Assets/Icons/BeagleGreen.ico index 923d6a3bf6ae1b16abbc54d40598d6a6ba8aa897..ce087fed1ed2ffe309c70991e0a20747ab6b7097 100644 GIT binary patch literal 17542 zcmeHOcYIVu*B+22(u*P}hH4Z+ibRnBp@sBKHoZ^+0RjRFVgXT6d_j>K1?imtX@rnu zvztU90R#jEUPKAK8Aw76kP6Rt&fMH(cUeOCL_h!dZhn)!GxyG%=ggcrbLPysLR1n} zM8}STer?3YHbOWGA#7~Q^7VwcN@Y!&DEY6S7Gj~D5cQ~>-w&@ML~{orY^e@4A%;-m za=xZgy@y>_w}{$BvBK_ljPP5M)NznYO2~9KL$Kb}5PZ9K~yh{5wkCCu2TG|t~cD$211(}2tR`#C13dIDbcS#<<;b8@Q0Tn5N@dh@ujXO zayCDOf>?p;aRS88-=2tv(i@w_`s-1mZc&tY>1wPvGF8_Lu7t0RdGE1f-V67F070Cu&12y=E$yy%i2C)%$}>~PL4HQ0#VBiS8+ zX#v=Cc`vRMT*asRroc7H<)J*dr-mRV@nw(<;>JJ31L41u8!P&UC%D*Ae`ae*9#~Eo zdjQGD{>wi@y>6A|cO&wso8@E8#O0_rQr z0jWdA_!#^ORqTNz6Zs|16q&GB)eh5r0;~~`_9_a&-s&5G- z3&0>ykVs>(`S0W93gM^u=ICe`xR&sjvb+bR`D0(s{eCxsFT1%}cnc%+lkxg07xa(w zMo7AX-z(V<{gXrBKF=P5x(h^%61ccg;2!aDYs=rmgNlEEVc<4zy?3c^iZ_1FG4J=I zSC3%Lu~lYl+$_35Ehbol>_I)obdD?D-k?FJ zRj&B%@ES87ZWiX_-Hb2cqz{FE#yI$8jzjqV&yDYld-pxbL(g^sMKmXFB|OZ_I!dMn!}zcZgAS{gYN4{Mq&fuxh)(^k4G8t@y+eh0(^cbLO#>{ zI1&@~Pd7dH>JTi++GO@@_MABq|Ih(657M5j z45|40r4IJ<(g)_VO`xu;0i+iP#QDK~y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?rYcFn-t*+9YJ=cO2r0;ih^M!}II|>p#u!d}0 z7~ieRv-Z?J=h3N;BENU3t``;r_`+V`4qJf-Y@OU8q&5{2Is+7T*f8&XE+bdcOjTN~ z+P*ka5}Rf_l=FRT42<@%^Mmnf1;Rm`zpWJi7nR}aDE55=%V-T5|ED}Fxn5QEtfV&h z`Doo2GEqd1ST3_uczu2=&E^Gq%RHF;khYNC9;cAqa*BB$EHR@uA>>mm`XSYd-As{1MZ1$tcsH7x&K%NT`)7O@ z>trN(B_B4kH~n;S;;0B6t7R@#UzA%N)+o3BPN%|YpZ_Aatx2AGTjS@MY>f*rC2!Wr zvvjj6i8$QYEZ@0Mi};|mC)dHhJ{Yq~iO1TYha^EShkKqga)XTNO=Yh(-l-E$z-;*90xfFH>pYL`{b3JW zw*{i$Oa<<>-h0e)+`BkE{Y9mqibo2sT^iy1I#vv zoh_Z+>F+N>9%zr$NQauVXul#!XdB&P_V6rcJg$pg*F7)WpW4L?oK3aad26=2E;`~jKB66xp2)3eQawhUt7UC|= z_d~gV$D0g>e~cG@ zfWI+8wkz4bVEDxDzHD481%t56WhjLMI9<$qa4%+clzp-NL-HDYj+|CPyPG9p12nj diff --git a/src/OSPSuite.Assets/Icons/BeagleRed.ico b/src/OSPSuite.Assets/Icons/BeagleRed.ico index 6fda323aaf644d1dafdf00ed531aaa265adee602..fd5f32e221616f970f9dc0dcd054c2ec976bb0ff 100644 GIT binary patch literal 17542 zcmeHPcU)D+@?Seqqo`37mEL<38)A#ZM59roiHU_648CY$?5T!4O^DH0VtE=hc~NY@ zy;Mb{SfYaMCDv3MYHWaliXzJQ&FtY^?!DX#_+EU!{P8=V&vMS)bI#6pcV=g2XXYS8 z9Z_HS`3XAPiOtSJgb5++>?(d+3QgjbE#=SjPbm+h;^niY+&3_eO3K5a&he$6z8O(^Ew)~1 zX{so_nIKB350AYRXhd=0X0fesy=0HT8ewsNoA~PVddsqrgXe?B7e0Yo5zr|CZl1AN zy8I;6N9^1*i|Wp?&;?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1QzDg0VO6Mai2m*~N`%@=wtZWz~S zkLaCg_~kaUdTOWDtMA2iCP{*j730*B;%8f;r2V~kXCaDCR$;@H9oipt-R&m(M}S`- z&XP>j*t!XGg2p0#hF(i-kX;G;kLK>B&U5XHJjlV6smfi z<50y=vKYAyn>J&1K_QC0pXWS{@dEZeYrl~GcPaFHAMugXaQgfebse|w+y%pQ7~)bgaNxubm|wgcv%}5# zcZ^@FzK;uWD&cxO)yeFki>AMZ!qBmp7w`!dx<82pLI1(r$jO-R_c7+uJTtz=&f2*g zzhz5oh+_e(Yc}J9G!M*flt(%NC&Hw@Ql7=lv-cP={XSu)Wt~hKH6}jTesO%TZ53S~ VknE}wf^C<{CDCTx`N5yP|6e+D$Up!9 diff --git a/src/OSPSuite.Assets/Icons/MouseRed.ico b/src/OSPSuite.Assets/Icons/MouseRed.ico index 2fda57d24dcd8828c545b18aa3414c6488740eec..b1d84ac12b667aa7cc85f32d9b1359677332bc8d 100644 GIT binary patch literal 17542 zcmeHOd3;Vs_a9qPLF^$F5wh<)5~0@EsKcDDlN(SI6gOw78Y45x&ImDNK3n<#eeR6A)MV}X#5rY zT#x%eYXbAfy)Wm0`16I2KlefMYMdB0*f-eHy+h<5%rkDDu@bx52OEb-bnlsj(D2`p zn0y{X{LVBpcdz_yb5Oe00$N+`dE3D?p->;Y#N`|XGxJaw8E>W> zf;MJhuyfQ%?Cz!W#PwWht(e>I!tzNYffRwlI02rAsxsH%d^=v?4&}QE0!2we&f&wY z0uLxNKi;M~B;OvJQx(6N?d}!M9x?ZI@hF&>|06N|U;7aocMh@f=keK!_Z{XK>Kp2=dujfj0>2t=#`G!W|Vu-+hzZ1y#LLhmuK*|z<%yl#dgdf|K z{^|BZ#oxwmx5mXI=7Bzb=5Yra|0`GSX!)ND?d;;vvRxEfTSm)lVi64!D=J$gqJ>#F zELzosNizYHrd4O-#sUrM2-JH?poS12QC?wg(?a0O@d6|xQA}f^_CdvOYO`lYMfjab z#xSp3zI0oQ|G~pYXk(o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+NSSB+-^enyFBu|Ty6uVyVix`SItGwZsF2|a+H8^+rTzeh7_H5nCdsC|97Z3`L z7mM~bs*UlrEn#189?6Ijmw{LwW(}8VcJQ3#Bi1VZA}dR^mYt$?JUSs2*yXXNU2}bsbBdlOHsTdY^FJZ&!1esq1q3t+t7gcGA-jIYJL z?`iJxxU8Ht2mwCs@bL>kcJ3k=n^{mF1|TTF9|hqSSYr2tO6Mi|v1;G*+R6G|PLwBX z?5EQ{!+I31T7zW~7AW-^gu>}0tEdd0CE&H1V=dah=e3Dx$JycY(G%e4>`HxDiC}p& ziv30ip8~I6>he+jdp_$^;P52kBSOKxw^`(iv9NVQbeKPuIzFSK*-2ivfA42o!Z97i zo&ymokHEV6Mp)UoAW{*E(vYvkIijw7N!*rLU-Q}+KbxhDo%u1F+D>*P7KhuQgwA(m zvs|R#m{x~O-?F_-?Jo~k%Em|2u49zfl!_FYYsJFUn2MwTtBNSEsTK6TBF5L6vQ4LK URT1NFwK75;tlL>0JnHlR0etU@(f|Me From 5ffa9953a6b7ac3d1c6054638556213abb3af3d3 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Wed, 19 Apr 2017 09:35:03 -0400 Subject: [PATCH 28/50] Fixes #50 update xls save filter (#51) * Fixes #50 update xls save filter * Also fixes bracket at wrong place --- src/OSPSuite.Core/Domain/Constants.cs | 2 +- .../OSPSuite.Core.Tests/Core/ConstantsSpecs.cs | 18 ++++++++++++++++++ .../OSPSuite.Core.Tests.csproj | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 tests/OSPSuite.Core.Tests/Core/ConstantsSpecs.cs diff --git a/src/OSPSuite.Core/Domain/Constants.cs b/src/OSPSuite.Core/Domain/Constants.cs index a5be19a8d..a41fe3848 100644 --- a/src/OSPSuite.Core/Domain/Constants.cs +++ b/src/OSPSuite.Core/Domain/Constants.cs @@ -207,7 +207,7 @@ public static class Filter public static readonly string CHART_LAYOUT_FILTER = XmlFilter("Chart Layout"); public static readonly string PDF_FILE_FILTER = FileFilter("Report", PDF_EXTENSION); public static readonly string XML_FILE_FILTER = XmlFilter("Xml"); - public static readonly string EXCEL_SAVE_FILE_FILTER = string.Format("Excel file (*{0})|*{0}|(Excel file *{1})|*{1}", XLS_EXTENSION, XLSX_EXTENSION); + public static readonly string EXCEL_SAVE_FILE_FILTER = string.Format("Excel file (*{0})|*{0}|Excel file (*{1})|*{1}", XLSX_EXTENSION, XLS_EXTENSION); public static readonly string EXCEL_OPEN_FILE_FILTER = string.Format("Excel file (*{0};*{1})|*{0};*{1}", XLS_EXTENSION, XLSX_EXTENSION); public static readonly string JOURNAL_FILE_FILTER = FileFilter("Journal File", JOURNAL_EXTENSION); public static readonly string WORD_SAVE_FILE_FILTER = FileFilter("Word", ".docx"); diff --git a/tests/OSPSuite.Core.Tests/Core/ConstantsSpecs.cs b/tests/OSPSuite.Core.Tests/Core/ConstantsSpecs.cs new file mode 100644 index 000000000..e6c7b6b7f --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Core/ConstantsSpecs.cs @@ -0,0 +1,18 @@ +using System; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain; + +namespace OSPSuite.Core +{ + public class When_validating_the_constants_defined_in_core : StaticContextSpecification + { + [Observation] + public void the_save_excel_filter_should_save_to_xls_first() + { + var posXlsx = Constants.Filter.EXCEL_SAVE_FILE_FILTER.IndexOf($"{Constants.Filter.XLSX_EXTENSION})", StringComparison.Ordinal); + var posXls = Constants.Filter.EXCEL_SAVE_FILE_FILTER.IndexOf($"{Constants.Filter.XLS_EXTENSION})", StringComparison.Ordinal); + posXlsx.ShouldBeSmallerThan(posXls); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index 44d88e515..a43befd99 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -168,6 +168,7 @@ + From 03d65b95ff183dadcfeac0740be427a989a15f24 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Tue, 25 Apr 2017 16:32:17 -0400 Subject: [PATCH 29/50] Fixes #52 update notification type (#53) * Fixes #52 Update NotificationType to include ALL and None as flag * Fixes #52 Update NotificationType to include ALL and None as flag * Fixes #52 Update NotificationType to include ALL and None as flag --- src/OSPSuite.Core/Domain/ValidationMessage.cs | 11 +++++++---- .../Core/NotificationTypeExtensionsSpecs.cs | 15 +++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/OSPSuite.Core/Domain/ValidationMessage.cs b/src/OSPSuite.Core/Domain/ValidationMessage.cs index 52236f694..a4a94e9a8 100644 --- a/src/OSPSuite.Core/Domain/ValidationMessage.cs +++ b/src/OSPSuite.Core/Domain/ValidationMessage.cs @@ -75,22 +75,25 @@ public enum NotificationType /// /// Indicating a problem that may produce an incorrect model /// - Warning = 2 << 0, + Warning = 1 << 0, /// /// Indicating a problem that leads to a corrupted model /// - Error = 2 << 1, + Error = 1 << 1, /// /// Indicating a message. Model is valid /// - Info = 2 << 2, + Info = 1 << 2, /// /// Indicates a debug information. Is only use for development /// - Debug = 2 << 3, + Debug = 1 << 3, + + + All = Debug | Warning | Info | Error } public static class MessageTypeExtensions diff --git a/tests/OSPSuite.Core.Tests/Core/NotificationTypeExtensionsSpecs.cs b/tests/OSPSuite.Core.Tests/Core/NotificationTypeExtensionsSpecs.cs index cdad0faf9..39cf5c9eb 100644 --- a/tests/OSPSuite.Core.Tests/Core/NotificationTypeExtensionsSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Core/NotificationTypeExtensionsSpecs.cs @@ -4,7 +4,7 @@ namespace OSPSuite.Core { - public class When_testing_if_a_message_type_is_of_a_given_type: StaticContextSpecification + public class When_testing_if_a_message_type_is_of_a_given_type : StaticContextSpecification { [Observation] public void should_return_true_for_all_basic_type() @@ -17,13 +17,16 @@ public void should_return_true_for_all_basic_type() [Observation] public void should_return_the_expected_result_for_composite_name() { - (NotificationType.Error |NotificationType.Info).Is(NotificationType.Error).ShouldBeTrue(); - (NotificationType.Error |NotificationType.Info).Is(NotificationType.Info).ShouldBeTrue(); - (NotificationType.Error |NotificationType.Warning).Is(NotificationType.Info).ShouldBeFalse(); + (NotificationType.Error | NotificationType.Info).Is(NotificationType.Error).ShouldBeTrue(); + (NotificationType.Error | NotificationType.Info).Is(NotificationType.Info).ShouldBeTrue(); + (NotificationType.Error | NotificationType.Warning).Is(NotificationType.Info).ShouldBeFalse(); (NotificationType.Error).Is(NotificationType.Error | NotificationType.Info).ShouldBeTrue(); (NotificationType.Info).Is(NotificationType.Info | NotificationType.Error).ShouldBeTrue(); (NotificationType.Error).Is(NotificationType.Info | NotificationType.Warning).ShouldBeFalse(); + (NotificationType.All).Is(NotificationType.Info).ShouldBeTrue(); + (NotificationType.All).Is(NotificationType.Error).ShouldBeTrue(); + (NotificationType.All).Is(NotificationType.Warning).ShouldBeTrue(); + (NotificationType.All).Is(NotificationType.Debug).ShouldBeTrue(); } - } -} \ No newline at end of file +} \ No newline at end of file From 2466d3bd9ff1e9e45c150e28c8ff08a7242c8d51 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 27 Apr 2017 11:09:07 -0400 Subject: [PATCH 30/50] Fixes #54 add batch domain to core (#55) * Fixes #54 add batch domain to core * Fixes #54 add batch domain to core * Fixes #54 add batch domain to core * Try to fixing issues with appveyor build --- src/OSPSuite.Core/Batch/BatchOutputValues.cs | 9 ++ .../Batch/BatchSimulationExport.cs | 12 +++ ...ionResultsToBatchSimulationExportMapper.cs | 65 +++++++++++ src/OSPSuite.Core/Batch/ParameterValue.cs | 8 ++ src/OSPSuite.Core/Domain/Constants.cs | 8 ++ ...QuantityPathToQuantityDisplayPathMapper.cs | 14 +++ src/OSPSuite.Core/Domain/PathElement.cs | 15 +++ src/OSPSuite.Core/OSPSuite.Core.csproj | 7 ++ .../Services/ISimulationResultsExporter.cs | 12 +++ .../OSPSuite.Infrastructure.csproj | 1 + .../Services/SimulationResultsExporter.cs | 48 +++++++++ src/OSPSuite.Presentation/DTO/PathElement.cs | 16 +-- .../DTO/PathRepresentableDTOExtensions.cs | 1 + ...QuantityPathToQuantityDisplayPathMapper.cs | 15 +-- ...ToSimulationParameterSelectionDTOMapper.cs | 1 + ...yToSimulationQuantitySelectionDTOMapper.cs | 1 + ...ivityAnalysisRunResultToDataTableMapper.cs | 1 + ...arameterToSensitivityParameterDTOMapper.cs | 3 +- .../Presenters/Charts/DataColumnsDTO.cs | 1 + .../Presenters/IQuantityPresenter.cs | 3 +- .../Services/Charts/ChartPresenterContext.cs | 3 +- .../Views/Comparisons/IComparisonView.cs | 1 + .../Views/IQuantityListView.cs | 1 + .../Views/ISimulationParametersView.cs | 1 + ...meterIdentificationLinkedParametersView.cs | 1 + src/OSPSuite.UI/Binders/PathElementsBinder.cs | 1 + .../Views/Comparisons/ComparisonView.cs | 1 + src/OSPSuite.UI/Views/QuantityListView.cs | 1 + .../Views/SimulationParametersView.cs | 1 + .../Batch/SimulationResultsExporterSpecs.cs | 86 +++++++++++++++ ...sultsToBatchSimulationExportMapperSpecs.cs | 101 ++++++++++++++++++ .../OSPSuite.Core.Tests.csproj | 2 + ...nPredictedVsObservedChartPresenterSpecs.cs | 1 + ...cationResidualVsTimeChartPresenterSpecs.cs | 1 + ...ificationTimeProfileChartPresenterSpecs.cs | 1 + ...ityPathToQuantityDisplayPathMapperSpecs.cs | 1 + ...mulationQuantitySelectionDTOMapperSpecs.cs | 1 + 37 files changed, 417 insertions(+), 29 deletions(-) create mode 100644 src/OSPSuite.Core/Batch/BatchOutputValues.cs create mode 100644 src/OSPSuite.Core/Batch/BatchSimulationExport.cs create mode 100644 src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs create mode 100644 src/OSPSuite.Core/Batch/ParameterValue.cs create mode 100644 src/OSPSuite.Core/Domain/Mappers/IQuantityPathToQuantityDisplayPathMapper.cs create mode 100644 src/OSPSuite.Core/Domain/PathElement.cs create mode 100644 src/OSPSuite.Core/Services/ISimulationResultsExporter.cs create mode 100644 src/OSPSuite.Infrastructure/Services/SimulationResultsExporter.cs create mode 100644 tests/OSPSuite.Core.Tests/Batch/SimulationResultsExporterSpecs.cs create mode 100644 tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs diff --git a/src/OSPSuite.Core/Batch/BatchOutputValues.cs b/src/OSPSuite.Core/Batch/BatchOutputValues.cs new file mode 100644 index 000000000..899672055 --- /dev/null +++ b/src/OSPSuite.Core/Batch/BatchOutputValues.cs @@ -0,0 +1,9 @@ +namespace OSPSuite.Core.Batch +{ + public class BatchOutputValues + { + public string Path { get; set; } + public float[] Values { get; set; } + public double Threshold { get; set; } + } +} \ No newline at end of file diff --git a/src/OSPSuite.Core/Batch/BatchSimulationExport.cs b/src/OSPSuite.Core/Batch/BatchSimulationExport.cs new file mode 100644 index 000000000..e4372a5de --- /dev/null +++ b/src/OSPSuite.Core/Batch/BatchSimulationExport.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace OSPSuite.Core.Batch +{ + public class BatchSimulationExport + { + public string Name { get; set; } + public float[] Time { get; set; } + public List OutputValues { get; set; } = new List(); + public List ParameterValues { get; set; } = new List(); + } +} \ No newline at end of file diff --git a/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs b/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs new file mode 100644 index 000000000..9ae2d6c97 --- /dev/null +++ b/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs @@ -0,0 +1,65 @@ +using System.Collections.Generic; +using System.Linq; +using OSPSuite.Core.Domain; +using OSPSuite.Core.Domain.Data; +using OSPSuite.Core.Domain.Mappers; +using OSPSuite.Utility.Extensions; + +namespace OSPSuite.Core.Batch.Mappers +{ + public interface ISimulationResultsToBatchSimulationExportMapper + { + BatchSimulationExport MapFrom(ISimulation simulation, DataRepository results); + } + + public class SimulationResultsToBatchSimulationExportMapper : ISimulationResultsToBatchSimulationExportMapper + { + private readonly IQuantityPathToQuantityDisplayPathMapper _quantityDisplayPathMapper; + private readonly IObjectPathFactory _objectPathFactory; + + public SimulationResultsToBatchSimulationExportMapper(IQuantityPathToQuantityDisplayPathMapper quantityDisplayPathMapper, IObjectPathFactory objectPathFactory) + { + _quantityDisplayPathMapper = quantityDisplayPathMapper; + _objectPathFactory = objectPathFactory; + } + + public BatchSimulationExport MapFrom(ISimulation simulation, DataRepository results) + { + var simulationExport = new BatchSimulationExport + { + Name = simulation.Name, + Time = displayValuesFor(results.BaseGrid), + ParameterValues = parameterValuesFor(simulation.Model) + }; + + results.AllButBaseGrid().Each(c => simulationExport.OutputValues.Add(quantityResultsFrom(simulation, c))); + + return simulationExport; + } + + private List parameterValuesFor(IModel simulationModel) + { + return simulationModel.Root.GetAllChildren().Select(p => new ParameterValue + { + Path = _objectPathFactory.CreateAbsoluteObjectPath(p).PathAsString, + Value = p.Value + }).ToList(); + } + + private BatchOutputValues quantityResultsFrom(ISimulation simulation, DataColumn column) + { + return new BatchOutputValues + { + Path = _quantityDisplayPathMapper.DisplayPathAsStringFor(simulation, column), + //TODO READ THRESHOLD FROM COLUMN EXTENDED PROPERTIES WHEN READY + Threshold = 1.5f, + Values = displayValuesFor(column) + }; + } + + private float[] displayValuesFor(DataColumn column) + { + return column.ConvertToDisplayValues(column.Values).ToArray(); + } + } +} \ No newline at end of file diff --git a/src/OSPSuite.Core/Batch/ParameterValue.cs b/src/OSPSuite.Core/Batch/ParameterValue.cs new file mode 100644 index 000000000..b228894dd --- /dev/null +++ b/src/OSPSuite.Core/Batch/ParameterValue.cs @@ -0,0 +1,8 @@ +namespace OSPSuite.Core.Batch +{ + public class ParameterValue + { + public string Path { get; set; } + public double Value { get; set; } + } +} \ No newline at end of file diff --git a/src/OSPSuite.Core/Domain/Constants.cs b/src/OSPSuite.Core/Domain/Constants.cs index a41fe3848..d6179d6c8 100644 --- a/src/OSPSuite.Core/Domain/Constants.cs +++ b/src/OSPSuite.Core/Domain/Constants.cs @@ -176,6 +176,14 @@ public static string ParameterCompoundType(int index) //end of delete } + public static class RegistryPaths + { + public const string PKSIM_REG_PATH = @"Open Systems Pharmacology\PK-Sim\"; + public const string MOBI_REG_PATH = @"Open Systems Pharmacology\MoBi\"; + public const string INSTALL_DIR = "InstallDir"; + public const string INSTALL_PATH = "InstallPath"; + } + public static class Groups { public const string UNDEFINED = "UNDEFINED"; diff --git a/src/OSPSuite.Core/Domain/Mappers/IQuantityPathToQuantityDisplayPathMapper.cs b/src/OSPSuite.Core/Domain/Mappers/IQuantityPathToQuantityDisplayPathMapper.cs new file mode 100644 index 000000000..b23ef8c92 --- /dev/null +++ b/src/OSPSuite.Core/Domain/Mappers/IQuantityPathToQuantityDisplayPathMapper.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; +using OSPSuite.Core.Domain.Data; + +namespace OSPSuite.Core.Domain.Mappers +{ + public interface IQuantityPathToQuantityDisplayPathMapper + { + string DisplayPathAsStringFor(ISimulation simulation, DataColumn column, bool addSimulationName = false); + string DisplayPathAsStringFor(ISimulation simulation, DataColumn column, string simulationName); + string DisplayPathAsStringFor(ISimulation simulation, DataColumn column, IEnumerable pathElementsToUse); + string DisplayPathAsStringFor(IQuantity quantity, bool addSimulationName = false); + string DisplayPathAsStringFor(IQuantity quantity, IEnumerable pathElementsToUse); + } +} \ No newline at end of file diff --git a/src/OSPSuite.Core/Domain/PathElement.cs b/src/OSPSuite.Core/Domain/PathElement.cs new file mode 100644 index 000000000..7ec9d7e50 --- /dev/null +++ b/src/OSPSuite.Core/Domain/PathElement.cs @@ -0,0 +1,15 @@ +namespace OSPSuite.Core.Domain +{ + /// + /// One path element + /// + public enum PathElement + { + Simulation, + TopContainer, + Container, + BottomCompartment, + Molecule, + Name + } +} \ No newline at end of file diff --git a/src/OSPSuite.Core/OSPSuite.Core.csproj b/src/OSPSuite.Core/OSPSuite.Core.csproj index f2d918700..fb3d1d991 100644 --- a/src/OSPSuite.Core/OSPSuite.Core.csproj +++ b/src/OSPSuite.Core/OSPSuite.Core.csproj @@ -100,6 +100,10 @@ Properties\SolutionInfo.cs + + + + @@ -130,6 +134,8 @@ + + @@ -498,6 +504,7 @@ + diff --git a/src/OSPSuite.Core/Services/ISimulationResultsExporter.cs b/src/OSPSuite.Core/Services/ISimulationResultsExporter.cs new file mode 100644 index 000000000..e1438e650 --- /dev/null +++ b/src/OSPSuite.Core/Services/ISimulationResultsExporter.cs @@ -0,0 +1,12 @@ +using System.Threading.Tasks; +using OSPSuite.Core.Domain; +using OSPSuite.Core.Domain.Data; + +namespace OSPSuite.Core.Services +{ + public interface ISimulationResultsExporter + { + Task ExportToCsvAsync(ISimulation simulation, DataRepository results, string fileName); + Task ExportToJsonAsync(ISimulation simulation, DataRepository results, string fileName); + } +} \ No newline at end of file diff --git a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj index c571970ab..2d7e4ecbc 100644 --- a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj +++ b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj @@ -182,6 +182,7 @@ + diff --git a/src/OSPSuite.Infrastructure/Services/SimulationResultsExporter.cs b/src/OSPSuite.Infrastructure/Services/SimulationResultsExporter.cs new file mode 100644 index 000000000..a8b51e343 --- /dev/null +++ b/src/OSPSuite.Infrastructure/Services/SimulationResultsExporter.cs @@ -0,0 +1,48 @@ +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Newtonsoft.Json; +using OSPSuite.Core.Batch.Mappers; +using OSPSuite.Core.Domain; +using OSPSuite.Core.Domain.Data; +using OSPSuite.Core.Domain.Mappers; +using OSPSuite.Core.Domain.Services; +using OSPSuite.Core.Services; +using OSPSuite.Utility.Extensions; + +namespace OSPSuite.Infrastructure.Services +{ + public class SimulationResultsExporter : ISimulationResultsExporter + { + private readonly IDataRepositoryTask _dataRepositoryTask; + private readonly IQuantityPathToQuantityDisplayPathMapper _quantityDisplayPathMapper; + private readonly ISimulationResultsToBatchSimulationExportMapper _simulationExportMapper; + + public SimulationResultsExporter(IDataRepositoryTask dataRepositoryTask, IQuantityPathToQuantityDisplayPathMapper quantityDisplayPathMapper, ISimulationResultsToBatchSimulationExportMapper simulationExportMapper) + { + _dataRepositoryTask = dataRepositoryTask; + _quantityDisplayPathMapper = quantityDisplayPathMapper; + _simulationExportMapper = simulationExportMapper; + } + + public Task ExportToCsvAsync(ISimulation simulation, DataRepository results, string fileName) + { + var dataTable = _dataRepositoryTask.ToDataTable(results, x => _quantityDisplayPathMapper.DisplayPathAsStringFor(simulation, x)).First(); + return Task.Run(() => dataTable.ExportToCSV(fileName)); + } + + public Task ExportToJsonAsync(ISimulation simulation, DataRepository results, string fileName) + { + return Task.Run(() => + { + var exportResults = _simulationExportMapper.MapFrom(simulation, results); + // serialize JSON directly to a file + using (var file = File.CreateText(fileName)) + { + var serializer = new JsonSerializer(); + serializer.Serialize(file, exportResults); + } + }); + } + } + } \ No newline at end of file diff --git a/src/OSPSuite.Presentation/DTO/PathElement.cs b/src/OSPSuite.Presentation/DTO/PathElement.cs index 990cb31fa..9161c516b 100644 --- a/src/OSPSuite.Presentation/DTO/PathElement.cs +++ b/src/OSPSuite.Presentation/DTO/PathElement.cs @@ -1,20 +1,8 @@ -using OSPSuite.Utility.Collections; +using OSPSuite.Core.Domain; +using OSPSuite.Utility.Collections; namespace OSPSuite.Presentation.DTO { - /// - /// One path element - /// - public enum PathElement - { - Simulation, - TopContainer, - Container, - BottomCompartment, - Molecule, - Name - } - /// /// A cache returning for each path element the corresonding /// diff --git a/src/OSPSuite.Presentation/DTO/PathRepresentableDTOExtensions.cs b/src/OSPSuite.Presentation/DTO/PathRepresentableDTOExtensions.cs index 65b729fea..f32451ea7 100644 --- a/src/OSPSuite.Presentation/DTO/PathRepresentableDTOExtensions.cs +++ b/src/OSPSuite.Presentation/DTO/PathRepresentableDTOExtensions.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using OSPSuite.Core.Domain; using OSPSuite.Core.Extensions; namespace OSPSuite.Presentation.DTO diff --git a/src/OSPSuite.Presentation/Mappers/QuantityPathToQuantityDisplayPathMapper.cs b/src/OSPSuite.Presentation/Mappers/QuantityPathToQuantityDisplayPathMapper.cs index 25e32b49b..244ea1b25 100644 --- a/src/OSPSuite.Presentation/Mappers/QuantityPathToQuantityDisplayPathMapper.cs +++ b/src/OSPSuite.Presentation/Mappers/QuantityPathToQuantityDisplayPathMapper.cs @@ -1,23 +1,14 @@ using System; using System.Collections.Generic; using System.Linq; -using OSPSuite.Utility.Extensions; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Data; +using OSPSuite.Core.Domain.Mappers; using OSPSuite.Presentation.DTO; +using OSPSuite.Utility.Extensions; namespace OSPSuite.Presentation.Mappers { - public interface IQuantityPathToQuantityDisplayPathMapper - { - PathElements DisplayPathFor(ISimulation simulation, DataColumn column); - string DisplayPathAsStringFor(ISimulation simulation, DataColumn column, bool addSimulationName = false); - string DisplayPathAsStringFor(ISimulation simulation, DataColumn column, string simulationName); - string DisplayPathAsStringFor(ISimulation simulation, DataColumn column, IEnumerable pathElementsToUse); - string DisplayPathAsStringFor(IQuantity quantity, bool addSimulationName = false); - string DisplayPathAsStringFor(IQuantity quantity, IEnumerable pathElementsToUse); - } - public class QuantityPathToQuantityDisplayPathMapper : IQuantityPathToQuantityDisplayPathMapper { private readonly IObjectPathFactory _objectPathFactory; @@ -61,7 +52,7 @@ public virtual string DisplayPathAsStringFor(ISimulation simulation, DataColumn return DisplayPathAsStringFrom(DisplayPathFor(simulation, column), pathElementsToUse); } - public virtual PathElements DisplayPathFor(ISimulation simulation, DataColumn column) + protected virtual PathElements DisplayPathFor(ISimulation simulation, DataColumn column) { return displayPathForColumn(column, simulation); } diff --git a/src/OSPSuite.Presentation/Mappers/QuantityToSimulationParameterSelectionDTOMapper.cs b/src/OSPSuite.Presentation/Mappers/QuantityToSimulationParameterSelectionDTOMapper.cs index 373fd4520..6c9018f73 100644 --- a/src/OSPSuite.Presentation/Mappers/QuantityToSimulationParameterSelectionDTOMapper.cs +++ b/src/OSPSuite.Presentation/Mappers/QuantityToSimulationParameterSelectionDTOMapper.cs @@ -1,5 +1,6 @@ using System.Linq; using OSPSuite.Core.Domain; +using OSPSuite.Core.Domain.Mappers; using OSPSuite.Core.Domain.Repositories; using OSPSuite.Presentation.DTO; diff --git a/src/OSPSuite.Presentation/Mappers/QuantityToSimulationQuantitySelectionDTOMapper.cs b/src/OSPSuite.Presentation/Mappers/QuantityToSimulationQuantitySelectionDTOMapper.cs index cee9f9209..8396f341f 100644 --- a/src/OSPSuite.Presentation/Mappers/QuantityToSimulationQuantitySelectionDTOMapper.cs +++ b/src/OSPSuite.Presentation/Mappers/QuantityToSimulationQuantitySelectionDTOMapper.cs @@ -1,4 +1,5 @@ using OSPSuite.Core.Domain; +using OSPSuite.Core.Domain.Mappers; using OSPSuite.Presentation.DTO; namespace OSPSuite.Presentation.Mappers diff --git a/src/OSPSuite.Presentation/Mappers/SensitivityAnalyses/SensitivityAnalysisRunResultToDataTableMapper.cs b/src/OSPSuite.Presentation/Mappers/SensitivityAnalyses/SensitivityAnalysisRunResultToDataTableMapper.cs index 1110fb253..20b0b4541 100644 --- a/src/OSPSuite.Presentation/Mappers/SensitivityAnalyses/SensitivityAnalysisRunResultToDataTableMapper.cs +++ b/src/OSPSuite.Presentation/Mappers/SensitivityAnalyses/SensitivityAnalysisRunResultToDataTableMapper.cs @@ -1,5 +1,6 @@ using System.Data; using OSPSuite.Assets; +using OSPSuite.Core.Domain.Mappers; using OSPSuite.Utility.Extensions; using OSPSuite.Core.Domain.PKAnalyses; using OSPSuite.Core.Domain.SensitivityAnalyses; diff --git a/src/OSPSuite.Presentation/Mappers/SensitivityAnalyses/SensitivityParameterToSensitivityParameterDTOMapper.cs b/src/OSPSuite.Presentation/Mappers/SensitivityAnalyses/SensitivityParameterToSensitivityParameterDTOMapper.cs index e9cf2d74b..3ed5512b6 100644 --- a/src/OSPSuite.Presentation/Mappers/SensitivityAnalyses/SensitivityParameterToSensitivityParameterDTOMapper.cs +++ b/src/OSPSuite.Presentation/Mappers/SensitivityAnalyses/SensitivityParameterToSensitivityParameterDTOMapper.cs @@ -1,4 +1,5 @@ -using OSPSuite.Utility; +using OSPSuite.Core.Domain.Mappers; +using OSPSuite.Utility; using OSPSuite.Core.Domain.SensitivityAnalyses; using OSPSuite.Presentation.DTO.SensitivityAnalyses; diff --git a/src/OSPSuite.Presentation/Presenters/Charts/DataColumnsDTO.cs b/src/OSPSuite.Presentation/Presenters/Charts/DataColumnsDTO.cs index 4978839f3..992b5a28a 100644 --- a/src/OSPSuite.Presentation/Presenters/Charts/DataColumnsDTO.cs +++ b/src/OSPSuite.Presentation/Presenters/Charts/DataColumnsDTO.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Data; using System.Linq; +using OSPSuite.Core.Domain; using OSPSuite.Utility.Extensions; using OSPSuite.Presentation.DTO; using DataColumn = OSPSuite.Core.Domain.Data.DataColumn; diff --git a/src/OSPSuite.Presentation/Presenters/IQuantityPresenter.cs b/src/OSPSuite.Presentation/Presenters/IQuantityPresenter.cs index 1b31b2d92..3fca02dce 100644 --- a/src/OSPSuite.Presentation/Presenters/IQuantityPresenter.cs +++ b/src/OSPSuite.Presentation/Presenters/IQuantityPresenter.cs @@ -1,4 +1,5 @@ -using OSPSuite.Presentation.DTO; +using OSPSuite.Core.Domain; +using OSPSuite.Presentation.DTO; namespace OSPSuite.Presentation.Presenters { diff --git a/src/OSPSuite.Presentation/Services/Charts/ChartPresenterContext.cs b/src/OSPSuite.Presentation/Services/Charts/ChartPresenterContext.cs index 7ccb5dc69..8021659d0 100644 --- a/src/OSPSuite.Presentation/Services/Charts/ChartPresenterContext.cs +++ b/src/OSPSuite.Presentation/Services/Charts/ChartPresenterContext.cs @@ -1,4 +1,5 @@ -using OSPSuite.Core.Domain.Services; +using OSPSuite.Core.Domain.Mappers; +using OSPSuite.Core.Domain.Services; using OSPSuite.Core.Domain.UnitSystem; using OSPSuite.Presentation.Mappers; using OSPSuite.Presentation.Presenters.Charts; diff --git a/src/OSPSuite.Presentation/Views/Comparisons/IComparisonView.cs b/src/OSPSuite.Presentation/Views/Comparisons/IComparisonView.cs index fe4767a9e..3c95f8a56 100644 --- a/src/OSPSuite.Presentation/Views/Comparisons/IComparisonView.cs +++ b/src/OSPSuite.Presentation/Views/Comparisons/IComparisonView.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using OSPSuite.Core.Domain; using OSPSuite.Presentation.DTO; using OSPSuite.Presentation.Presenters.Comparisons; diff --git a/src/OSPSuite.Presentation/Views/IQuantityListView.cs b/src/OSPSuite.Presentation/Views/IQuantityListView.cs index ecdbfb7b9..f86d21ff0 100644 --- a/src/OSPSuite.Presentation/Views/IQuantityListView.cs +++ b/src/OSPSuite.Presentation/Views/IQuantityListView.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using OSPSuite.Core.Domain; using OSPSuite.Presentation.DTO; using OSPSuite.Presentation.Presenters; diff --git a/src/OSPSuite.Presentation/Views/ISimulationParametersView.cs b/src/OSPSuite.Presentation/Views/ISimulationParametersView.cs index 2e3efdd48..5e23dfd4c 100644 --- a/src/OSPSuite.Presentation/Views/ISimulationParametersView.cs +++ b/src/OSPSuite.Presentation/Views/ISimulationParametersView.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using OSPSuite.Core.Domain; using OSPSuite.Presentation.DTO; using OSPSuite.Presentation.Presenters; diff --git a/src/OSPSuite.Presentation/Views/ParameterIdentifications/IParameterIdentificationLinkedParametersView.cs b/src/OSPSuite.Presentation/Views/ParameterIdentifications/IParameterIdentificationLinkedParametersView.cs index 080e431ed..d91ace97f 100644 --- a/src/OSPSuite.Presentation/Views/ParameterIdentifications/IParameterIdentificationLinkedParametersView.cs +++ b/src/OSPSuite.Presentation/Views/ParameterIdentifications/IParameterIdentificationLinkedParametersView.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using OSPSuite.Core.Domain; using OSPSuite.Presentation.DTO; using OSPSuite.Presentation.DTO.ParameterIdentifications; using OSPSuite.Presentation.Presenters.ParameterIdentifications; diff --git a/src/OSPSuite.UI/Binders/PathElementsBinder.cs b/src/OSPSuite.UI/Binders/PathElementsBinder.cs index 6ffcc2e6e..6e9ecfee9 100644 --- a/src/OSPSuite.UI/Binders/PathElementsBinder.cs +++ b/src/OSPSuite.UI/Binders/PathElementsBinder.cs @@ -8,6 +8,7 @@ using DevExpress.XtraEditors.Controls; using DevExpress.XtraEditors.Repository; using OSPSuite.Assets; +using OSPSuite.Core.Domain; using OSPSuite.Presentation.DTO; using OSPSuite.UI.Extensions; using OSPSuite.UI.RepositoryItems; diff --git a/src/OSPSuite.UI/Views/Comparisons/ComparisonView.cs b/src/OSPSuite.UI/Views/Comparisons/ComparisonView.cs index afc01903e..e51961160 100644 --- a/src/OSPSuite.UI/Views/Comparisons/ComparisonView.cs +++ b/src/OSPSuite.UI/Views/Comparisons/ComparisonView.cs @@ -6,6 +6,7 @@ using DevExpress.XtraGrid.Views.Grid; using DevExpress.XtraLayout.Utils; using OSPSuite.Assets; +using OSPSuite.Core.Domain; using OSPSuite.Presentation; using OSPSuite.Presentation.DTO; using OSPSuite.Presentation.Extensions; diff --git a/src/OSPSuite.UI/Views/QuantityListView.cs b/src/OSPSuite.UI/Views/QuantityListView.cs index 801b333df..686d607ae 100644 --- a/src/OSPSuite.UI/Views/QuantityListView.cs +++ b/src/OSPSuite.UI/Views/QuantityListView.cs @@ -9,6 +9,7 @@ using DevExpress.XtraGrid.Menu; using DevExpress.XtraGrid.Views.Grid; using OSPSuite.Assets; +using OSPSuite.Core.Domain; using OSPSuite.Presentation.DTO; using OSPSuite.Presentation.Presenters; using OSPSuite.Presentation.Views; diff --git a/src/OSPSuite.UI/Views/SimulationParametersView.cs b/src/OSPSuite.UI/Views/SimulationParametersView.cs index 18aa98a0c..abfe46124 100644 --- a/src/OSPSuite.UI/Views/SimulationParametersView.cs +++ b/src/OSPSuite.UI/Views/SimulationParametersView.cs @@ -6,6 +6,7 @@ using OSPSuite.Utility.Format; using DevExpress.XtraEditors.Repository; using OSPSuite.Assets; +using OSPSuite.Core.Domain; using OSPSuite.Presentation.DTO; using OSPSuite.Presentation.Presenters; using OSPSuite.Presentation.Services; diff --git a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsExporterSpecs.cs b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsExporterSpecs.cs new file mode 100644 index 000000000..bd6308e1e --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsExporterSpecs.cs @@ -0,0 +1,86 @@ +using System.Collections.Generic; +using System.Data; +using System.Threading.Tasks; +using FakeItEasy; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Batch; +using OSPSuite.Core.Batch.Mappers; +using OSPSuite.Core.Domain; +using OSPSuite.Core.Domain.Data; +using OSPSuite.Core.Domain.Mappers; +using OSPSuite.Core.Domain.Services; +using OSPSuite.Core.Services; +using OSPSuite.Infrastructure.Services; +using OSPSuite.Utility; + +namespace PKSim.BatchTool +{ + public abstract class concern_for_SimulationResultsExporter : ContextSpecification + { + protected IDataRepositoryTask _dataRepositoryTask; + private IQuantityPathToQuantityDisplayPathMapper _quantityDisplayPathMapper; + protected ISimulationResultsToBatchSimulationExportMapper _batchSimulationExportMapper; + protected ISimulation _simulation; + protected DataRepository _results; + protected string _fileName; + + protected override void Context() + { + _dataRepositoryTask = A.Fake(); + _quantityDisplayPathMapper = A.Fake(); + _batchSimulationExportMapper = A.Fake(); + sut = new SimulationResultsExporter(_dataRepositoryTask, _quantityDisplayPathMapper, _batchSimulationExportMapper); + + _simulation = A.Fake(); + _results = new DataRepository(); + _fileName = FileHelper.GenerateTemporaryFileName(); + } + + public override void GlobalCleanup() + { + base.GlobalCleanup(); + FileHelper.DeleteFile(_fileName); + } + } + + public class When_exporting_simulation_results_to_csv : concern_for_SimulationResultsExporter + { + private List _dataTables; + + protected override void Context() + { + base.Context(); + var dataTable = new DataTable("TEST"); + + _dataTables = new List {dataTable}; + A.CallTo(_dataRepositoryTask).WithReturnType>().Returns(_dataTables); + } + + [Observation] + public void should_create_a_data_table_with_all_results_from_the_simulation_and_export_it_to_the_file() + { + sut.ExportToCsvAsync(_simulation, _results, _fileName).Wait(); + FileHelper.FileExists(_fileName).ShouldBeTrue(); + } + } + + public class When_exporting_simulation_results_to_json : concern_for_SimulationResultsExporter + { + private BatchSimulationExport _batchSimulationExport; + + protected override void Context() + { + base.Context(); + _batchSimulationExport = new BatchSimulationExport {Name = "Sim"}; + A.CallTo(() => _batchSimulationExportMapper.MapFrom(_simulation, _results)).Returns(_batchSimulationExport); + } + + [Observation] + public void should_create_a_batch_simulation_export_object_and_export_it_to_the_file() + { + sut.ExportToJsonAsync(_simulation, _results, _fileName).Wait(); + FileHelper.FileExists(_fileName).ShouldBeTrue(); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs new file mode 100644 index 000000000..f9b4c1bd1 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs @@ -0,0 +1,101 @@ +using FakeItEasy; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Batch; +using OSPSuite.Core.Batch.Mappers; +using OSPSuite.Core.Domain; +using OSPSuite.Core.Domain.Data; +using OSPSuite.Core.Domain.Formulas; +using OSPSuite.Core.Domain.Mappers; +using OSPSuite.Helpers; + +namespace OSPSuite.Batch +{ + public abstract class concern_for_SimulationResultsToBatchSimulationExportMapper : ContextSpecification + { + protected IQuantityPathToQuantityDisplayPathMapper _quantityDisplayPathMapper; + protected IObjectPathFactory _objectPathFactory; + + protected override void Context() + { + _quantityDisplayPathMapper = A.Fake(); + _objectPathFactory = A.Fake(); + sut = new SimulationResultsToBatchSimulationExportMapper(_quantityDisplayPathMapper, _objectPathFactory); + } + } + + public class When_mapping_simulation_results_to_batch_simulation_export : concern_for_SimulationResultsToBatchSimulationExportMapper + { + private DataRepository _dataRepository; + private ISimulation _simulation; + private BatchSimulationExport _simulationExport; + private BaseGrid _baseGrid; + private DataColumn _col1; + private DataColumn _col2; + private Parameter _parameter; + + protected override void Context() + { + base.Context(); + _simulation = A.Fake().WithName("SIM"); + _parameter = new Parameter().WithName("P1").WithFormula(new ConstantFormula(10)); + _simulation.Model = new Model + { + Root = new Container + { + _parameter + } + }; + + _baseGrid = new BaseGrid("Time", DomainHelperForSpecs.TimeDimensionForSpecs()) {Values = new[] {1f, 2f, 3f}}; + _col1 = new DataColumn("Drug1", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) {Values = new[] {10f, 20f, 30f}}; + _col2 = new DataColumn("Drug2", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) {Values = new[] {100f, 200f, 300f}}; + + _dataRepository = new DataRepository {_col1, _col2}; + + A.CallTo(() => _quantityDisplayPathMapper.DisplayPathAsStringFor(_simulation, _col1, false)).Returns("PATH1"); + A.CallTo(() => _quantityDisplayPathMapper.DisplayPathAsStringFor(_simulation, _col2, false)).Returns("PATH2"); + A.CallTo(() => _objectPathFactory.CreateAbsoluteObjectPath(_parameter)).Returns(new ObjectPath("Sim", "P1")); + } + + protected override void Because() + { + _simulationExport = sut.MapFrom(_simulation, _dataRepository); + } + + [Observation] + public void should_return_an_object_having_the_expected_simulation_properties() + { + _simulationExport.Name.ShouldBeEqualTo(_simulation.Name); + } + + [Observation] + public void should_have_created_one_output_value_for_each_output_results() + { + _simulationExport.OutputValues.Count.ShouldBeEqualTo(2); + verifyOutputExport(_simulationExport.OutputValues[0], _col1, "PATH1", 1.5); + verifyOutputExport(_simulationExport.OutputValues[1], _col2, "PATH2", 1.5); + } + + private void verifyOutputExport(BatchOutputValues outputValues, DataColumn column, string path, double threshold) + { + outputValues.Path.ShouldBeEqualTo(path); + outputValues.Values.ShouldBeEqualTo(column.ConvertToDisplayValues(column.Values)); + outputValues.Threshold.ShouldBeEqualTo(threshold); + } + + [Observation] + public void should_have_set_the_time_values_using_display_units() + { + _simulationExport.Time.ShouldBeEqualTo(_baseGrid.ConvertToDisplayValues(_baseGrid.Values)); + } + + [Observation] + public void should_have_exported_parameter_values() + { + _simulationExport.ParameterValues.Count.ShouldBeEqualTo(1); + _simulationExport.ParameterValues[0].Path.ShouldBeEqualTo(_objectPathFactory.CreateAbsoluteObjectPath(_parameter).PathAsString); + _simulationExport.ParameterValues[0].Value.ShouldBeEqualTo(_parameter.Value); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index a43befd99..09b5f7b4b 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -137,6 +137,8 @@ Properties\SolutionInfo.cs + + diff --git a/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationPredictedVsObservedChartPresenterSpecs.cs b/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationPredictedVsObservedChartPresenterSpecs.cs index ca1b6f360..cbc962192 100644 --- a/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationPredictedVsObservedChartPresenterSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationPredictedVsObservedChartPresenterSpecs.cs @@ -7,6 +7,7 @@ using OSPSuite.Core.Chart.ParameterIdentifications; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Data; +using OSPSuite.Core.Domain.Mappers; using OSPSuite.Core.Domain.ParameterIdentifications; using OSPSuite.Core.Domain.Services; using OSPSuite.Core.Domain.UnitSystem; diff --git a/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationResidualVsTimeChartPresenterSpecs.cs b/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationResidualVsTimeChartPresenterSpecs.cs index 424717052..76d02f2e5 100644 --- a/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationResidualVsTimeChartPresenterSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationResidualVsTimeChartPresenterSpecs.cs @@ -6,6 +6,7 @@ using OSPSuite.Core.Chart; using OSPSuite.Core.Chart.ParameterIdentifications; using OSPSuite.Core.Domain.Data; +using OSPSuite.Core.Domain.Mappers; using OSPSuite.Core.Domain.ParameterIdentifications; using OSPSuite.Core.Domain.Services; using OSPSuite.Core.Domain.UnitSystem; diff --git a/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationTimeProfileChartPresenterSpecs.cs b/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationTimeProfileChartPresenterSpecs.cs index 7b0b0381a..6ec1c8e96 100644 --- a/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationTimeProfileChartPresenterSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Presentation/ParameterIdentificationTimeProfileChartPresenterSpecs.cs @@ -5,6 +5,7 @@ using OSPSuite.Core; using OSPSuite.Core.Chart.ParameterIdentifications; using OSPSuite.Core.Domain.Data; +using OSPSuite.Core.Domain.Mappers; using OSPSuite.Core.Domain.ParameterIdentifications; using OSPSuite.Core.Domain.Services; using OSPSuite.Core.Domain.UnitSystem; diff --git a/tests/OSPSuite.Core.Tests/Presentation/QuantityPathToQuantityDisplayPathMapperSpecs.cs b/tests/OSPSuite.Core.Tests/Presentation/QuantityPathToQuantityDisplayPathMapperSpecs.cs index 6d85efa6c..fb0b1d666 100644 --- a/tests/OSPSuite.Core.Tests/Presentation/QuantityPathToQuantityDisplayPathMapperSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Presentation/QuantityPathToQuantityDisplayPathMapperSpecs.cs @@ -4,6 +4,7 @@ using OSPSuite.Core; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Data; +using OSPSuite.Core.Domain.Mappers; using OSPSuite.Helpers; using OSPSuite.Presentation.DTO; using OSPSuite.Presentation.Mappers; diff --git a/tests/OSPSuite.Core.Tests/Presentation/QuantityToSimulationQuantitySelectionDTOMapperSpecs.cs b/tests/OSPSuite.Core.Tests/Presentation/QuantityToSimulationQuantitySelectionDTOMapperSpecs.cs index 48c101b5f..e94a8df58 100644 --- a/tests/OSPSuite.Core.Tests/Presentation/QuantityToSimulationQuantitySelectionDTOMapperSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Presentation/QuantityToSimulationQuantitySelectionDTOMapperSpecs.cs @@ -2,6 +2,7 @@ using OSPSuite.BDDHelper.Extensions; using FakeItEasy; using OSPSuite.Core.Domain; +using OSPSuite.Core.Domain.Mappers; using OSPSuite.Presentation.DTO; using OSPSuite.Presentation.Mappers; From e1fca32a65f4148704f23bdbb62850d8e3cbace8 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Mon, 1 May 2017 09:15:54 -0400 Subject: [PATCH 31/50] Fixes #56 Add AbsTol and RelTol to batch export (#57) --- .../Batch/BatchSimulationExport.cs | 18 +++++++++++++++++- ...tionResultsToBatchSimulationExportMapper.cs | 6 ++++-- ...esultsToBatchSimulationExportMapperSpecs.cs | 9 ++++++++- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/OSPSuite.Core/Batch/BatchSimulationExport.cs b/src/OSPSuite.Core/Batch/BatchSimulationExport.cs index e4372a5de..52d5c08a2 100644 --- a/src/OSPSuite.Core/Batch/BatchSimulationExport.cs +++ b/src/OSPSuite.Core/Batch/BatchSimulationExport.cs @@ -5,7 +5,23 @@ namespace OSPSuite.Core.Batch public class BatchSimulationExport { public string Name { get; set; } - public float[] Time { get; set; } + + /// + /// Time Array used in the simulation + /// + public float[] Times { get; set; } + + /// + /// Absolute tolerance used in the simulation + /// + public double AbsTol { get; set; } + + /// + /// Relative tolerance used in the simulation + /// + public double RelTol { get; set; } + + public List OutputValues { get; set; } = new List(); public List ParameterValues { get; set; } = new List(); } diff --git a/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs b/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs index 9ae2d6c97..932033c87 100644 --- a/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs +++ b/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs @@ -28,8 +28,10 @@ public BatchSimulationExport MapFrom(ISimulation simulation, DataRepository resu var simulationExport = new BatchSimulationExport { Name = simulation.Name, - Time = displayValuesFor(results.BaseGrid), - ParameterValues = parameterValuesFor(simulation.Model) + Times = displayValuesFor(results.BaseGrid), + ParameterValues = parameterValuesFor(simulation.Model), + AbsTol = simulation.SimulationSettings.Solver.AbsTol, + RelTol = simulation.SimulationSettings.Solver.RelTol, }; results.AllButBaseGrid().Each(c => simulationExport.OutputValues.Add(quantityResultsFrom(simulation, c))); diff --git a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs index f9b4c1bd1..cea931b51 100644 --- a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs @@ -33,6 +33,8 @@ public class When_mapping_simulation_results_to_batch_simulation_export : concer private DataColumn _col1; private DataColumn _col2; private Parameter _parameter; + private double _absTol = 1e-2; + private double _relTol = 1e-3; protected override void Context() { @@ -47,6 +49,9 @@ protected override void Context() } }; + _simulation.SimulationSettings.Solver.AbsTol = _absTol; + _simulation.SimulationSettings.Solver.RelTol = _relTol; + _baseGrid = new BaseGrid("Time", DomainHelperForSpecs.TimeDimensionForSpecs()) {Values = new[] {1f, 2f, 3f}}; _col1 = new DataColumn("Drug1", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) {Values = new[] {10f, 20f, 30f}}; _col2 = new DataColumn("Drug2", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) {Values = new[] {100f, 200f, 300f}}; @@ -67,6 +72,8 @@ protected override void Because() public void should_return_an_object_having_the_expected_simulation_properties() { _simulationExport.Name.ShouldBeEqualTo(_simulation.Name); + _simulationExport.AbsTol.ShouldBeEqualTo(_absTol); + _simulationExport.RelTol.ShouldBeEqualTo(_relTol); } [Observation] @@ -87,7 +94,7 @@ private void verifyOutputExport(BatchOutputValues outputValues, DataColumn colum [Observation] public void should_have_set_the_time_values_using_display_units() { - _simulationExport.Time.ShouldBeEqualTo(_baseGrid.ConvertToDisplayValues(_baseGrid.Values)); + _simulationExport.Times.ShouldBeEqualTo(_baseGrid.ConvertToDisplayValues(_baseGrid.Values)); } [Observation] From 371774e4d76fcec60e26624d8d7b96471de6ed90 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Mon, 1 May 2017 09:21:41 -0400 Subject: [PATCH 32/50] Fixesd #58 Add Dimension to batch output (#59) --- src/OSPSuite.Core/Batch/BatchOutputValues.cs | 1 + .../SimulationResultsToBatchSimulationExportMapper.cs | 3 ++- ...SimulationResultsToBatchSimulationExportMapperSpecs.cs | 8 +++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/OSPSuite.Core/Batch/BatchOutputValues.cs b/src/OSPSuite.Core/Batch/BatchOutputValues.cs index 899672055..6ecb416d6 100644 --- a/src/OSPSuite.Core/Batch/BatchOutputValues.cs +++ b/src/OSPSuite.Core/Batch/BatchOutputValues.cs @@ -5,5 +5,6 @@ public class BatchOutputValues public string Path { get; set; } public float[] Values { get; set; } public double Threshold { get; set; } + public string Dimension { get; set; } } } \ No newline at end of file diff --git a/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs b/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs index 932033c87..db91b3eeb 100644 --- a/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs +++ b/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs @@ -55,7 +55,8 @@ private BatchOutputValues quantityResultsFrom(ISimulation simulation, DataColumn Path = _quantityDisplayPathMapper.DisplayPathAsStringFor(simulation, column), //TODO READ THRESHOLD FROM COLUMN EXTENDED PROPERTIES WHEN READY Threshold = 1.5f, - Values = displayValuesFor(column) + Values = displayValuesFor(column), + Dimension = column.Dimension.Name }; } diff --git a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs index cea931b51..4239cb96d 100644 --- a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs @@ -7,6 +7,7 @@ using OSPSuite.Core.Domain.Data; using OSPSuite.Core.Domain.Formulas; using OSPSuite.Core.Domain.Mappers; +using OSPSuite.Core.Domain.UnitSystem; using OSPSuite.Helpers; namespace OSPSuite.Batch @@ -80,14 +81,15 @@ public void should_return_an_object_having_the_expected_simulation_properties() public void should_have_created_one_output_value_for_each_output_results() { _simulationExport.OutputValues.Count.ShouldBeEqualTo(2); - verifyOutputExport(_simulationExport.OutputValues[0], _col1, "PATH1", 1.5); - verifyOutputExport(_simulationExport.OutputValues[1], _col2, "PATH2", 1.5); + verifyOutputExport(_simulationExport.OutputValues[0], _col1, "PATH1", 1.5, _col1.Dimension); + verifyOutputExport(_simulationExport.OutputValues[1], _col2, "PATH2", 1.5, _col2.Dimension); } - private void verifyOutputExport(BatchOutputValues outputValues, DataColumn column, string path, double threshold) + private void verifyOutputExport(BatchOutputValues outputValues, DataColumn column, string path, double threshold, IDimension dimension) { outputValues.Path.ShouldBeEqualTo(path); outputValues.Values.ShouldBeEqualTo(column.ConvertToDisplayValues(column.Values)); + outputValues.Dimension.ShouldBeEqualTo(dimension.Name); outputValues.Threshold.ShouldBeEqualTo(threshold); } From 53b479880083d8d78bf631c3b012a881832f2395 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Mon, 1 May 2017 10:26:18 -0400 Subject: [PATCH 33/50] Fixes #60 comparison threshold (#61) * Add Comparison threshold to DataInfo * Fixes #60 add comparison threshold --- src/OSPSuite.Core/Batch/BatchOutputValues.cs | 2 +- ...ionResultsToBatchSimulationExportMapper.cs | 4 +- src/OSPSuite.Core/Domain/Data/DataColumn.cs | 13 ++--- src/OSPSuite.Core/Domain/Data/DataInfo.cs | 33 +++++++------ .../Domain/Data/DataRepository.cs | 2 +- src/OSPSuite.Core/Domain/Data/QuantityInfo.cs | 7 +-- .../Domain/Services/DataFactory.cs | 15 ++++-- src/OSPSuite.Core/OSPSuite.Core.csproj | 5 +- .../Xml/DataInfoXmlSerializer.cs | 1 + src/OSPSuite.Core/packages.config | 2 +- .../OSPSuite.Infrastructure.csproj | 4 +- src/OSPSuite.Infrastructure/packages.config | 2 +- .../OSPSuite.Presentation.csproj | 4 +- src/OSPSuite.Presentation/packages.config | 2 +- .../Batch/SimulationResultsExporterSpecs.cs | 3 +- ...sultsToBatchSimulationExportMapperSpecs.cs | 9 ++-- .../Core/DataColumnXmlSerializerSpecs.cs | 1 + .../OSPSuite.Core.Tests/Core/DataInfoSpecs.cs | 48 +++++++++++++++++++ .../Core/SimModelManagerIntegrationTests.cs | 11 ++++- .../Helpers/AssertForSpecs.cs | 1 + .../OSPSuite.Core.Tests.csproj | 12 +++-- tests/OSPSuite.Core.Tests/packages.config | 4 +- .../OSPSuite.Starter/OSPSuite.Starter.csproj | 5 ++ .../OSPSuite.UI.Tests.csproj | 5 ++ 24 files changed, 134 insertions(+), 61 deletions(-) create mode 100644 tests/OSPSuite.Core.Tests/Core/DataInfoSpecs.cs diff --git a/src/OSPSuite.Core/Batch/BatchOutputValues.cs b/src/OSPSuite.Core/Batch/BatchOutputValues.cs index 6ecb416d6..b452f5c20 100644 --- a/src/OSPSuite.Core/Batch/BatchOutputValues.cs +++ b/src/OSPSuite.Core/Batch/BatchOutputValues.cs @@ -4,7 +4,7 @@ public class BatchOutputValues { public string Path { get; set; } public float[] Values { get; set; } - public double Threshold { get; set; } public string Dimension { get; set; } + public double ComparisonThreshold { get; set; } } } \ No newline at end of file diff --git a/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs b/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs index db91b3eeb..dfbbfb890 100644 --- a/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs +++ b/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs @@ -53,8 +53,8 @@ private BatchOutputValues quantityResultsFrom(ISimulation simulation, DataColumn return new BatchOutputValues { Path = _quantityDisplayPathMapper.DisplayPathAsStringFor(simulation, column), - //TODO READ THRESHOLD FROM COLUMN EXTENDED PROPERTIES WHEN READY - Threshold = 1.5f, + //ComparisonThreshold should alwyas have a value. If for some reason it is not set, using 0 ensures that value should be compared exactly + ComparisonThreshold = column.DataInfo.ComparisonThreshold.GetValueOrDefault(0), Values = displayValuesFor(column), Dimension = column.Dimension.Name }; diff --git a/src/OSPSuite.Core/Domain/Data/DataColumn.cs b/src/OSPSuite.Core/Domain/Data/DataColumn.cs index 8016f7728..0c1581ce8 100644 --- a/src/OSPSuite.Core/Domain/Data/DataColumn.cs +++ b/src/OSPSuite.Core/Domain/Data/DataColumn.cs @@ -64,7 +64,7 @@ public DataColumn(string id, string name, IDimension dimension, BaseGrid baseGri public DataRepository Repository { set { _repository = value == null ? null : new WeakRef(value); } - get { return _repository != null ? _repository.Target : null; } + get { return _repository?.Target; } } public virtual bool IsInRepository() @@ -94,14 +94,7 @@ public virtual float this[int index] /// /// Returns true if the column values only contain one element otherwise false /// - public virtual bool HasSingleValue - { - get - { - if (_values == null) return false; - return _values.Count == 1; - } - } + public virtual bool HasSingleValue => _values?.Count == 1; /// /// Set or gets the values of the given columns. Always returns an array having the same dimension as the base grid @@ -131,7 +124,7 @@ public virtual IReadOnlyList Values if (value != null && BaseGrid != null && value.Count != BaseGrid.Count && value.Count != 1) throw new ArgumentException("Values.Length = " + value.Count + " != " + BaseGrid.Count + " = BaseGrid.Count"); - _values = value != null ? value.ToList() : null; + _values = value?.ToList(); _cachedValues = null; } } diff --git a/src/OSPSuite.Core/Domain/Data/DataInfo.cs b/src/OSPSuite.Core/Domain/Data/DataInfo.cs index c90f1b3b9..0c4486481 100644 --- a/src/OSPSuite.Core/Domain/Data/DataInfo.cs +++ b/src/OSPSuite.Core/Domain/Data/DataInfo.cs @@ -27,7 +27,7 @@ public enum ColumnOrigins ObservationAuxiliary, // if Observation and AuxiliaryType defined /// - /// Column is based on calculation values but is used in a different context (for example ParameterIdentification plots) + /// Column is based on calculation values but is used in a different context (for example ParameterIdentification plots) /// CalculationAuxiliary } @@ -43,8 +43,6 @@ public enum AuxiliaryType public class DataInfo { - private readonly ExtendedProperties _extendedProperties; - public ColumnOrigins Origin { get; set; } /// @@ -82,6 +80,19 @@ public class DataInfo /// public double? MolWeight { get; set; } + /// + /// Meta Information on the current column (organ, compartment for observed data etc.) + /// + public ExtendedProperties ExtendedProperties { get; } + + public float? LLOQ { get; set; } + + /// + /// Indicates the threshold that should be used to compare two output columns. This will only be set for calculate + /// columns + /// + public float? ComparisonThreshold { get; set; } + [Obsolete("For serialization")] public DataInfo() : this(ColumnOrigins.Undefined) { @@ -101,23 +112,15 @@ public DataInfo(ColumnOrigins origin, AuxiliaryType auxiliaryType, string displa Source = source; Category = category; MolWeight = molWeight; - _extendedProperties = new ExtendedProperties(); + ExtendedProperties = new ExtendedProperties(); } - /// - /// Meta Information on the current column (organ, compartment for observed data etc.) - /// - public ExtendedProperties ExtendedProperties => _extendedProperties; - - public float? LLOQ { get; set; } - - /// - /// Returns a clone of the DataInfo - /// public DataInfo Clone() { var dataInfo = new DataInfo(Origin, AuxiliaryType, DisplayUnitName, Date, Source, Category, MolWeight); - dataInfo.ExtendedProperties.UpdateFrom(_extendedProperties); + dataInfo.ExtendedProperties.UpdateFrom(ExtendedProperties); + dataInfo.LLOQ = LLOQ; + dataInfo.ComparisonThreshold = ComparisonThreshold; return dataInfo; } } diff --git a/src/OSPSuite.Core/Domain/Data/DataRepository.cs b/src/OSPSuite.Core/Domain/Data/DataRepository.cs index 95f41ac57..87439d5b0 100644 --- a/src/OSPSuite.Core/Domain/Data/DataRepository.cs +++ b/src/OSPSuite.Core/Domain/Data/DataRepository.cs @@ -15,7 +15,7 @@ public class DataRepository : ObjectBase, IEnumerable /// /// All Extended properties /// - public virtual ExtendedProperties ExtendedProperties { get; private set; } + public virtual ExtendedProperties ExtendedProperties { get; } public DataRepository() : this(Guid.NewGuid().ToString()) { diff --git a/src/OSPSuite.Core/Domain/Data/QuantityInfo.cs b/src/OSPSuite.Core/Domain/Data/QuantityInfo.cs index 8bac9379a..65565834d 100644 --- a/src/OSPSuite.Core/Domain/Data/QuantityInfo.cs +++ b/src/OSPSuite.Core/Domain/Data/QuantityInfo.cs @@ -46,10 +46,7 @@ public QuantityInfo(string name, IEnumerable quantityPath, QuantityType /// /// Returns the full path as string /// - public string PathAsString - { - get { return _path.ToPathString(); } - } + public string PathAsString => _path.ToPathString(); /// /// Full path of quantity for which data were saved. @@ -85,7 +82,7 @@ public bool Equals(QuantityInfo other) public override int GetHashCode() { - return (PathAsString != null ? PathAsString.GetHashCode() : 0); + return PathAsString?.GetHashCode() ?? 0; } public override string ToString() diff --git a/src/OSPSuite.Core/Domain/Services/DataFactory.cs b/src/OSPSuite.Core/Domain/Services/DataFactory.cs index 81d86ad5e..606b56e6c 100644 --- a/src/OSPSuite.Core/Domain/Services/DataFactory.cs +++ b/src/OSPSuite.Core/Domain/Services/DataFactory.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; -using OSPSuite.Utility.Collections; -using SimModelNET; using OSPSuite.Core.Domain.Data; using OSPSuite.Core.Domain.UnitSystem; using OSPSuite.Core.Extensions; using OSPSuite.Core.Services; +using OSPSuite.Utility.Collections; +using SimModelNET; namespace OSPSuite.Core.Domain.Services { @@ -18,7 +18,10 @@ public interface IDataFactory /// /// the core simulation for which results should be retrieved /// the simmodel simulation containing the results - /// The optional name for the repository. If not provided, the standard name retrieved from the will be used + /// + /// The optional name for the repository. If not provided, the standard name retrieved from + /// the will be used + /// /// DataRepository CreateRepository(IModelCoreSimulation simulation, SimModelNET.ISimulation simModelSimulation, string repositoryName = null); @@ -80,7 +83,11 @@ private DataColumn createColumn(BaseGrid xValues, IQuantity quantity, IValues yV { var column = new DataColumn(_dataNamingService.GetEntityName(yValues.EntityId), quantity.Dimension, xValues) { - DataInfo = {Origin = ColumnOrigins.Calculation}, + DataInfo = + { + Origin = ColumnOrigins.Calculation, + ComparisonThreshold = (float) yValues.ComparisonThreshold + }, Values = new List(yValues.Values.ToFloatArray()), QuantityInfo = new QuantityInfo(yValues.Name, quantityPath, quantity.QuantityType), DisplayUnit = _displayUnitRetriever.PreferredUnitFor(quantity) diff --git a/src/OSPSuite.Core/OSPSuite.Core.csproj b/src/OSPSuite.Core/OSPSuite.Core.csproj index fb3d1d991..5cb39696d 100644 --- a/src/OSPSuite.Core/OSPSuite.Core.csproj +++ b/src/OSPSuite.Core/OSPSuite.Core.csproj @@ -73,8 +73,9 @@ ..\..\packages\OSPSuite.Serializer.2.0.0.1\lib\net45\OSPSuite.Serializer.dll - - ..\..\packages\OSPSuite.SimModel.2.0.0.1\lib\net45\OSPSuite.SimModel.dll + + ..\..\packages\OSPSuite.SimModel.2.0.0.12\lib\net45\OSPSuite.SimModel.dll + True False diff --git a/src/OSPSuite.Core/Serialization/Xml/DataInfoXmlSerializer.cs b/src/OSPSuite.Core/Serialization/Xml/DataInfoXmlSerializer.cs index 1c4d54537..511cb2d25 100644 --- a/src/OSPSuite.Core/Serialization/Xml/DataInfoXmlSerializer.cs +++ b/src/OSPSuite.Core/Serialization/Xml/DataInfoXmlSerializer.cs @@ -21,6 +21,7 @@ public override void PerformMapping() Map(x => x.Category); Map(x => x.MolWeight); Map(x => x.LLOQ).WithMappingName(Constants.Serialization.Attribute.LLOQ); + Map(x => x.ComparisonThreshold); MapEnumerable(x => x.ExtendedProperties, addFunction); } diff --git a/src/OSPSuite.Core/packages.config b/src/OSPSuite.Core/packages.config index 0778d23ce..f39587b7d 100644 --- a/src/OSPSuite.Core/packages.config +++ b/src/OSPSuite.Core/packages.config @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj index 2d7e4ecbc..892b1ca4d 100644 --- a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj +++ b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj @@ -80,8 +80,8 @@ ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll True - - ..\..\packages\OSPSuite.SmartXLS.2.6.3.1\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.3.3\lib\net45\SX.dll True diff --git a/src/OSPSuite.Infrastructure/packages.config b/src/OSPSuite.Infrastructure/packages.config index 11b01e00e..85997052a 100644 --- a/src/OSPSuite.Infrastructure/packages.config +++ b/src/OSPSuite.Infrastructure/packages.config @@ -8,7 +8,7 @@ - + diff --git a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj index 98f7ad263..4197486c4 100644 --- a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj +++ b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj @@ -52,8 +52,8 @@ ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll True - - ..\..\packages\OSPSuite.SmartXLS.2.6.3.1\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.3.3\lib\net45\SX.dll True diff --git a/src/OSPSuite.Presentation/packages.config b/src/OSPSuite.Presentation/packages.config index 849ac887f..53b268691 100644 --- a/src/OSPSuite.Presentation/packages.config +++ b/src/OSPSuite.Presentation/packages.config @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsExporterSpecs.cs b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsExporterSpecs.cs index bd6308e1e..5e14ff128 100644 --- a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsExporterSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsExporterSpecs.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Data; -using System.Threading.Tasks; using FakeItEasy; using OSPSuite.BDDHelper; using OSPSuite.BDDHelper.Extensions; @@ -14,7 +13,7 @@ using OSPSuite.Infrastructure.Services; using OSPSuite.Utility; -namespace PKSim.BatchTool +namespace OSPSuite.Batch { public abstract class concern_for_SimulationResultsExporter : ContextSpecification { diff --git a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs index 4239cb96d..7c3e51f69 100644 --- a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs @@ -55,6 +55,7 @@ protected override void Context() _baseGrid = new BaseGrid("Time", DomainHelperForSpecs.TimeDimensionForSpecs()) {Values = new[] {1f, 2f, 3f}}; _col1 = new DataColumn("Drug1", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) {Values = new[] {10f, 20f, 30f}}; + _col1.DataInfo.ComparisonThreshold = 1e-2f; _col2 = new DataColumn("Drug2", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) {Values = new[] {100f, 200f, 300f}}; _dataRepository = new DataRepository {_col1, _col2}; @@ -81,16 +82,16 @@ public void should_return_an_object_having_the_expected_simulation_properties() public void should_have_created_one_output_value_for_each_output_results() { _simulationExport.OutputValues.Count.ShouldBeEqualTo(2); - verifyOutputExport(_simulationExport.OutputValues[0], _col1, "PATH1", 1.5, _col1.Dimension); - verifyOutputExport(_simulationExport.OutputValues[1], _col2, "PATH2", 1.5, _col2.Dimension); + verifyOutputExport(_simulationExport.OutputValues[0], _col1, "PATH1", _col1.DataInfo.ComparisonThreshold.Value, _col1.Dimension); + verifyOutputExport(_simulationExport.OutputValues[1], _col2, "PATH2", 0, _col2.Dimension); } - private void verifyOutputExport(BatchOutputValues outputValues, DataColumn column, string path, double threshold, IDimension dimension) + private void verifyOutputExport(BatchOutputValues outputValues, DataColumn column, string path, double comparisonThreshold, IDimension dimension) { outputValues.Path.ShouldBeEqualTo(path); outputValues.Values.ShouldBeEqualTo(column.ConvertToDisplayValues(column.Values)); outputValues.Dimension.ShouldBeEqualTo(dimension.Name); - outputValues.Threshold.ShouldBeEqualTo(threshold); + outputValues.ComparisonThreshold.ShouldBeEqualTo(comparisonThreshold); } [Observation] diff --git a/tests/OSPSuite.Core.Tests/Core/DataColumnXmlSerializerSpecs.cs b/tests/OSPSuite.Core.Tests/Core/DataColumnXmlSerializerSpecs.cs index ce7975627..b5499099e 100644 --- a/tests/OSPSuite.Core.Tests/Core/DataColumnXmlSerializerSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Core/DataColumnXmlSerializerSpecs.cs @@ -24,6 +24,7 @@ public void TestSerializationWithoutRelatedColumn() Values = new[] {1.0F, 2.1F, -3.4F} }; x1.DataInfo.LLOQ = 1.0F; + x1.DataInfo.ComparisonThreshold = 1e-2F; var dr1 = new DataRepository("id") {x1}; var dr2 = SerializeAndDeserialize(dr1); diff --git a/tests/OSPSuite.Core.Tests/Core/DataInfoSpecs.cs b/tests/OSPSuite.Core.Tests/Core/DataInfoSpecs.cs new file mode 100644 index 000000000..664b9c7f4 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Core/DataInfoSpecs.cs @@ -0,0 +1,48 @@ +using System; +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain; +using OSPSuite.Core.Domain.Data; + +namespace OSPSuite.Core +{ + public abstract class concern_for_DataInfo : ContextSpecification + { + protected override void Context() + { + sut = new DataInfo(ColumnOrigins.Calculation, AuxiliaryType.ArithmeticStdDev, "ml", DateTime.Today, "Journal", "cat", 155d) + { + LLOQ = 25, + ComparisonThreshold = 1e-3f + }; + + sut.ExtendedProperties.Add(new ExtendedProperty {Name = "Test", Value = "hello"}); + } + } + + public class When_cloning_a_data_info : concern_for_DataInfo + { + private DataInfo _clone; + + protected override void Because() + { + _clone = sut.Clone(); + } + + [Observation] + public void should_clone_all_the_properties_of_the_data_info() + { + _clone.ComparisonThreshold.ShouldBeEqualTo(sut.ComparisonThreshold); + _clone.LLOQ.ShouldBeEqualTo(sut.LLOQ); + _clone.AuxiliaryType.ShouldBeEqualTo(sut.AuxiliaryType); + _clone.Origin.ShouldBeEqualTo(sut.Origin); + _clone.DisplayUnitName.ShouldBeEqualTo(sut.DisplayUnitName); + _clone.Date.ShouldBeEqualTo(sut.Date); + _clone.Source.ShouldBeEqualTo(sut.Source); + _clone.Category.ShouldBeEqualTo(sut.Category); + _clone.MolWeight.ShouldBeEqualTo(sut.MolWeight); + + _clone.ExtendedProperties["Test"].ValueAsObject.ShouldBeEqualTo("hello"); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Core/SimModelManagerIntegrationTests.cs b/tests/OSPSuite.Core.Tests/Core/SimModelManagerIntegrationTests.cs index b8b836722..befc9bf8d 100644 --- a/tests/OSPSuite.Core.Tests/Core/SimModelManagerIntegrationTests.cs +++ b/tests/OSPSuite.Core.Tests/Core/SimModelManagerIntegrationTests.cs @@ -90,7 +90,7 @@ public void should_return_repository_with_number_of_amounts_and_observers_and_pe [Observation] public void should_have_set_the_molweight_in_amounts_and_observers_when_available() { - foreach (var dataColumn in _results.Where(x => !x.IsBaseGrid())) + foreach (var dataColumn in _results.AllButBaseGrid()) { if (molWeightShouldBeSetFor(dataColumn)) dataColumn.DataInfo.MolWeight.ShouldBeEqualTo(250); @@ -99,6 +99,15 @@ public void should_have_set_the_molweight_in_amounts_and_observers_when_availabl } } + [Observation] + public void should_have_set_comparison_threshold_for_observers_and_variables() + { + foreach (var dataColumn in _results.AllButBaseGrid()) + { + dataColumn.DataInfo.ComparisonThreshold.ShouldNotBeNull(); + } + } + private bool molWeightShouldBeSetFor(DataColumn dataColumn) { if (dataColumn.QuantityInfo.Name == "A") diff --git a/tests/OSPSuite.Core.Tests/Helpers/AssertForSpecs.cs b/tests/OSPSuite.Core.Tests/Helpers/AssertForSpecs.cs index 1638247ec..8f8e80c9e 100644 --- a/tests/OSPSuite.Core.Tests/Helpers/AssertForSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Helpers/AssertForSpecs.cs @@ -1121,6 +1121,7 @@ public static void AreEqualMcDataColumn(DataColumn x1, DataColumn x2) AreEqualMcQuantityInfo(x1.QuantityInfo, x2.QuantityInfo); AreEqualMcDataInfo(x1.DataInfo, x2.DataInfo); x1.DataInfo.LLOQ.ShouldBeEqualTo(x2.DataInfo.LLOQ); + x1.DataInfo.ComparisonThreshold.ShouldBeEqualTo(x2.DataInfo.ComparisonThreshold); Assert.AreEqual(x1.RelatedColumns.Count(), x2.RelatedColumns.Count()); foreach (var relCol1 in x1.RelatedColumns) diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index 09b5f7b4b..f9875ed98 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -104,8 +104,9 @@ ..\..\packages\OSPSuite.Serializer.2.0.0.1\lib\net45\OSPSuite.Serializer.dll - - ..\..\packages\OSPSuite.SimModel.2.0.0.1\lib\net45\OSPSuite.SimModel.dll + + ..\..\packages\OSPSuite.SimModel.2.0.0.12\lib\net45\OSPSuite.SimModel.dll + True ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll @@ -114,8 +115,8 @@ ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll True - - ..\..\packages\OSPSuite.SmartXLS.2.6.3.1\lib\net45\SX.dll + + ..\..\packages\OSPSuite.SmartXLS.2.6.3.3\lib\net45\SX.dll True @@ -171,6 +172,7 @@ + @@ -744,7 +746,7 @@ - + OSPSuite.SimModel.xsd Designer PreserveNewest diff --git a/tests/OSPSuite.Core.Tests/packages.config b/tests/OSPSuite.Core.Tests/packages.config index 055f52339..ef8782499 100644 --- a/tests/OSPSuite.Core.Tests/packages.config +++ b/tests/OSPSuite.Core.Tests/packages.config @@ -13,9 +13,9 @@ - + - + \ No newline at end of file diff --git a/tests/OSPSuite.Starter/OSPSuite.Starter.csproj b/tests/OSPSuite.Starter/OSPSuite.Starter.csproj index d3fe99e48..29373870f 100644 --- a/tests/OSPSuite.Starter/OSPSuite.Starter.csproj +++ b/tests/OSPSuite.Starter/OSPSuite.Starter.csproj @@ -441,6 +441,11 @@ TestView.cs + + OSPSuite.SimModel.xsd + Designer + PreserveNewest + Designer diff --git a/tests/OSPSuite.UI.Tests/OSPSuite.UI.Tests.csproj b/tests/OSPSuite.UI.Tests/OSPSuite.UI.Tests.csproj index 1760b0ff6..deac1be29 100644 --- a/tests/OSPSuite.UI.Tests/OSPSuite.UI.Tests.csproj +++ b/tests/OSPSuite.UI.Tests/OSPSuite.UI.Tests.csproj @@ -157,6 +157,11 @@ + + OSPSuite.SimModel.xsd + Designer + PreserveNewest + PreserveNewest From 04237971bbe1d7a273f7be40c5cc00d21ac05591 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Mon, 1 May 2017 14:04:09 -0400 Subject: [PATCH 34/50] Fixes #62 use full output path (#63) --- ...ionResultsToBatchSimulationExportMapper.cs | 11 +++----- ...sultsToBatchSimulationExportMapperSpecs.cs | 26 +++++++++++-------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs b/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs index dfbbfb890..e7916355a 100644 --- a/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs +++ b/src/OSPSuite.Core/Batch/Mappers/SimulationResultsToBatchSimulationExportMapper.cs @@ -2,7 +2,6 @@ using System.Linq; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Data; -using OSPSuite.Core.Domain.Mappers; using OSPSuite.Utility.Extensions; namespace OSPSuite.Core.Batch.Mappers @@ -14,12 +13,10 @@ public interface ISimulationResultsToBatchSimulationExportMapper public class SimulationResultsToBatchSimulationExportMapper : ISimulationResultsToBatchSimulationExportMapper { - private readonly IQuantityPathToQuantityDisplayPathMapper _quantityDisplayPathMapper; private readonly IObjectPathFactory _objectPathFactory; - public SimulationResultsToBatchSimulationExportMapper(IQuantityPathToQuantityDisplayPathMapper quantityDisplayPathMapper, IObjectPathFactory objectPathFactory) + public SimulationResultsToBatchSimulationExportMapper(IObjectPathFactory objectPathFactory) { - _quantityDisplayPathMapper = quantityDisplayPathMapper; _objectPathFactory = objectPathFactory; } @@ -34,7 +31,7 @@ public BatchSimulationExport MapFrom(ISimulation simulation, DataRepository resu RelTol = simulation.SimulationSettings.Solver.RelTol, }; - results.AllButBaseGrid().Each(c => simulationExport.OutputValues.Add(quantityResultsFrom(simulation, c))); + results.AllButBaseGrid().Each(c => simulationExport.OutputValues.Add(quantityResultsFrom(c))); return simulationExport; } @@ -48,11 +45,11 @@ private List parameterValuesFor(IModel simulationModel) }).ToList(); } - private BatchOutputValues quantityResultsFrom(ISimulation simulation, DataColumn column) + private BatchOutputValues quantityResultsFrom( DataColumn column) { return new BatchOutputValues { - Path = _quantityDisplayPathMapper.DisplayPathAsStringFor(simulation, column), + Path = column.PathAsString, //ComparisonThreshold should alwyas have a value. If for some reason it is not set, using 0 ensures that value should be compared exactly ComparisonThreshold = column.DataInfo.ComparisonThreshold.GetValueOrDefault(0), Values = displayValuesFor(column), diff --git a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs index 7c3e51f69..03e246eb4 100644 --- a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs @@ -14,14 +14,12 @@ namespace OSPSuite.Batch { public abstract class concern_for_SimulationResultsToBatchSimulationExportMapper : ContextSpecification { - protected IQuantityPathToQuantityDisplayPathMapper _quantityDisplayPathMapper; protected IObjectPathFactory _objectPathFactory; protected override void Context() { - _quantityDisplayPathMapper = A.Fake(); _objectPathFactory = A.Fake(); - sut = new SimulationResultsToBatchSimulationExportMapper(_quantityDisplayPathMapper, _objectPathFactory); + sut = new SimulationResultsToBatchSimulationExportMapper( _objectPathFactory); } } @@ -54,14 +52,20 @@ protected override void Context() _simulation.SimulationSettings.Solver.RelTol = _relTol; _baseGrid = new BaseGrid("Time", DomainHelperForSpecs.TimeDimensionForSpecs()) {Values = new[] {1f, 2f, 3f}}; - _col1 = new DataColumn("Drug1", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) {Values = new[] {10f, 20f, 30f}}; - _col1.DataInfo.ComparisonThreshold = 1e-2f; - _col2 = new DataColumn("Drug2", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) {Values = new[] {100f, 200f, 300f}}; - + _col1 = new DataColumn("Drug1", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) + { + Values = new[] {10f, 20f, 30f}, + QuantityInfo = {Path = new[] {"P1", "P2"}}, + DataInfo = {ComparisonThreshold = 1e-2f} + }; + _col2 = new DataColumn("Drug2", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) + { + Values = new[] {100f, 200f, 300f}, + QuantityInfo = {Path = new[] {"P3", "P4"}} + }; _dataRepository = new DataRepository {_col1, _col2}; - A.CallTo(() => _quantityDisplayPathMapper.DisplayPathAsStringFor(_simulation, _col1, false)).Returns("PATH1"); - A.CallTo(() => _quantityDisplayPathMapper.DisplayPathAsStringFor(_simulation, _col2, false)).Returns("PATH2"); + A.CallTo(() => _objectPathFactory.CreateAbsoluteObjectPath(_parameter)).Returns(new ObjectPath("Sim", "P1")); } @@ -82,8 +86,8 @@ public void should_return_an_object_having_the_expected_simulation_properties() public void should_have_created_one_output_value_for_each_output_results() { _simulationExport.OutputValues.Count.ShouldBeEqualTo(2); - verifyOutputExport(_simulationExport.OutputValues[0], _col1, "PATH1", _col1.DataInfo.ComparisonThreshold.Value, _col1.Dimension); - verifyOutputExport(_simulationExport.OutputValues[1], _col2, "PATH2", 0, _col2.Dimension); + verifyOutputExport(_simulationExport.OutputValues[0], _col1, _col1.PathAsString, _col1.DataInfo.ComparisonThreshold.Value, _col1.Dimension); + verifyOutputExport(_simulationExport.OutputValues[1], _col2, _col2.PathAsString, 0, _col2.Dimension); } private void verifyOutputExport(BatchOutputValues outputValues, DataColumn column, string path, double comparisonThreshold, IDimension dimension) From bb83595263d3fc761689cebced9305f68cd78510 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 4 May 2017 10:25:08 -0400 Subject: [PATCH 35/50] Fixes #64 Rename 6.4.2 to 7.1.0 (#65) --- .../Converter63To64.cs => v7_1/Converter63To710.cs} | 12 ++++++------ src/OSPSuite.Core/OSPSuite.Core.csproj | 2 +- src/OSPSuite.Core/Serialization/PKMLVersion.cs | 4 ++-- ...ationResultsToBatchSimulationExportMapperSpecs.cs | 8 ++++++++ .../Converter63To710Specs.cs} | 10 +++++----- tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj | 2 +- tests/OSPSuite.Starter/Properties/licenses.licx | 5 +++-- 7 files changed, 26 insertions(+), 17 deletions(-) rename src/OSPSuite.Core/Converter/{v6_4/Converter63To64.cs => v7_1/Converter63To710.cs} (90%) rename tests/OSPSuite.Core.Tests/Converter/{v6_4/Converter63To64Specs.cs => v7_1/Converter63To710Specs.cs} (86%) diff --git a/src/OSPSuite.Core/Converter/v6_4/Converter63To64.cs b/src/OSPSuite.Core/Converter/v7_1/Converter63To710.cs similarity index 90% rename from src/OSPSuite.Core/Converter/v6_4/Converter63To64.cs rename to src/OSPSuite.Core/Converter/v7_1/Converter63To710.cs index 2d131ae2f..31d5fa1f9 100644 --- a/src/OSPSuite.Core/Converter/v6_4/Converter63To64.cs +++ b/src/OSPSuite.Core/Converter/v7_1/Converter63To710.cs @@ -1,12 +1,12 @@ using System.Xml.Linq; -using OSPSuite.Serializer.Xml.Extensions; -using OSPSuite.Utility.Extensions; using OSPSuite.Core.Serialization; using OSPSuite.Core.Serialization.Xml.Extensions; +using OSPSuite.Serializer.Xml.Extensions; +using OSPSuite.Utility.Extensions; -namespace OSPSuite.Core.Converter.v6_4 +namespace OSPSuite.Core.Converter.v7_1 { - public class Converter63To64 : IObjectConverter + public class Converter63To710 : IObjectConverter { public bool IsSatisfiedBy(int version) { @@ -15,13 +15,13 @@ public bool IsSatisfiedBy(int version) public int Convert(object objectToUpdate) { - return PKMLVersion.V6_4_2; + return PKMLVersion.V7_1_0; } public int ConvertXml(XElement element) { element.DescendantsAndSelfNamed("CurveChartTemplate").Each(convertCurveChartTemplate); - return PKMLVersion.V6_4_2; + return PKMLVersion.V7_1_0; } private void convertCurveChartTemplate(XElement chartTemplateElement) diff --git a/src/OSPSuite.Core/OSPSuite.Core.csproj b/src/OSPSuite.Core/OSPSuite.Core.csproj index 5cb39696d..e4c8900f8 100644 --- a/src/OSPSuite.Core/OSPSuite.Core.csproj +++ b/src/OSPSuite.Core/OSPSuite.Core.csproj @@ -201,7 +201,7 @@ - + diff --git a/src/OSPSuite.Core/Serialization/PKMLVersion.cs b/src/OSPSuite.Core/Serialization/PKMLVersion.cs index 09199b873..ae0ea11ef 100644 --- a/src/OSPSuite.Core/Serialization/PKMLVersion.cs +++ b/src/OSPSuite.Core/Serialization/PKMLVersion.cs @@ -11,7 +11,7 @@ public static class PKMLVersion public static readonly int V6_1_1 = 9; public static readonly int V6_2_1 = 10; public static readonly int V6_3_1 = 11; - public static readonly int V6_4_2 = 12; - public static readonly int Current = V6_4_2; + public static readonly int V7_1_0 = 12; + public static readonly int Current = V7_1_0; } } \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs index 03e246eb4..6ef895ba2 100644 --- a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs @@ -87,7 +87,15 @@ public void should_have_created_one_output_value_for_each_output_results() { _simulationExport.OutputValues.Count.ShouldBeEqualTo(2); verifyOutputExport(_simulationExport.OutputValues[0], _col1, _col1.PathAsString, _col1.DataInfo.ComparisonThreshold.Value, _col1.Dimension); +<<<<<<< 162ba7b8bd4deb5e8a0046010219d0cf56817f29 +<<<<<<< 04237971bbe1d7a273f7be40c5cc00d21ac05591 verifyOutputExport(_simulationExport.OutputValues[1], _col2, _col2.PathAsString, 0, _col2.Dimension); +======= + verifyOutputExport(_simulationExport.OutputValues[1], _col2, _col1.PathAsString, 0, _col2.Dimension); +>>>>>>> Fixes #62 use full output path +======= + verifyOutputExport(_simulationExport.OutputValues[1], _col2, _col2.PathAsString, 0, _col2.Dimension); +>>>>>>> Fixes #62 use full output path } private void verifyOutputExport(BatchOutputValues outputValues, DataColumn column, string path, double comparisonThreshold, IDimension dimension) diff --git a/tests/OSPSuite.Core.Tests/Converter/v6_4/Converter63To64Specs.cs b/tests/OSPSuite.Core.Tests/Converter/v7_1/Converter63To710Specs.cs similarity index 86% rename from tests/OSPSuite.Core.Tests/Converter/v6_4/Converter63To64Specs.cs rename to tests/OSPSuite.Core.Tests/Converter/v7_1/Converter63To710Specs.cs index ac4f6d30d..6aeb7234c 100644 --- a/tests/OSPSuite.Core.Tests/Converter/v6_4/Converter63To64Specs.cs +++ b/tests/OSPSuite.Core.Tests/Converter/v7_1/Converter63To710Specs.cs @@ -2,19 +2,19 @@ using System.Xml.Linq; using OSPSuite.BDDHelper; using OSPSuite.BDDHelper.Extensions; -using OSPSuite.Core.Converter.v6_4; +using OSPSuite.Core.Converter.v7_1; -namespace OSPSuite.Converter.v6_4 +namespace OSPSuite.Converter.v7_1 { - public abstract class concern_for_Converter63To64 : ContextSpecification + public abstract class concern_for_Converter63To710 : ContextSpecification { protected override void Context() { - sut = new Converter63To64(); + sut = new Converter63To710(); } } - public class When_converting_a_curve_chart_template_element : concern_for_Converter63To64 + public class When_converting_a_curve_chart_template_element : concern_for_Converter63To710 { private XElement _chartTemplateElement; diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index f9875ed98..891a34546 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -165,7 +165,7 @@ - + diff --git a/tests/OSPSuite.Starter/Properties/licenses.licx b/tests/OSPSuite.Starter/Properties/licenses.licx index 97d21b881..8275fa1c4 100644 --- a/tests/OSPSuite.Starter/Properties/licenses.licx +++ b/tests/OSPSuite.Starter/Properties/licenses.licx @@ -1,2 +1,3 @@ -DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v16.2, Version=16.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v16.2, Version=16.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v16.2, Version=16.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v16.2, Version=16.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v16.2, Version=16.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a From 13c4f6ca02efd30d58ae85ff223e8566fe7c6660 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 4 May 2017 10:44:34 -0400 Subject: [PATCH 36/50] Fixes broken PR --- ...SimulationResultsToBatchSimulationExportMapperSpecs.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs index 6ef895ba2..03e246eb4 100644 --- a/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs +++ b/tests/OSPSuite.Core.Tests/Batch/SimulationResultsToBatchSimulationExportMapperSpecs.cs @@ -87,15 +87,7 @@ public void should_have_created_one_output_value_for_each_output_results() { _simulationExport.OutputValues.Count.ShouldBeEqualTo(2); verifyOutputExport(_simulationExport.OutputValues[0], _col1, _col1.PathAsString, _col1.DataInfo.ComparisonThreshold.Value, _col1.Dimension); -<<<<<<< 162ba7b8bd4deb5e8a0046010219d0cf56817f29 -<<<<<<< 04237971bbe1d7a273f7be40c5cc00d21ac05591 verifyOutputExport(_simulationExport.OutputValues[1], _col2, _col2.PathAsString, 0, _col2.Dimension); -======= - verifyOutputExport(_simulationExport.OutputValues[1], _col2, _col1.PathAsString, 0, _col2.Dimension); ->>>>>>> Fixes #62 use full output path -======= - verifyOutputExport(_simulationExport.OutputValues[1], _col2, _col2.PathAsString, 0, _col2.Dimension); ->>>>>>> Fixes #62 use full output path } private void verifyOutputExport(BatchOutputValues outputValues, DataColumn column, string path, double comparisonThreshold, IDimension dimension) From 0f07ec746c20944204ed22d9674d76af062719e5 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 4 May 2017 16:10:54 -0400 Subject: [PATCH 37/50] Fixes #68 Move constants from installation validator to core (#69) --- src/OSPSuite.Core/Domain/Constants.cs | 14 +++- .../Extensions/ExceptionExtensions.cs | 29 +++++++ .../IApplicationConfiguration.cs | 22 ++++-- src/OSPSuite.Core/OSPSuite.Core.csproj | 1 + .../Configuration/OSPSuiteConfiguration.cs | 1 + .../OSPSuite.Infrastructure.csproj | 1 + .../Services/StartableProcess.cs | 76 +++++++++++++++++++ .../Services/ExceptionManager.cs | 29 ++----- .../Tasks/ApplicationConfiguration.cs | 1 + 9 files changed, 140 insertions(+), 34 deletions(-) create mode 100644 src/OSPSuite.Core/Extensions/ExceptionExtensions.cs create mode 100644 src/OSPSuite.Infrastructure/Services/StartableProcess.cs diff --git a/src/OSPSuite.Core/Domain/Constants.cs b/src/OSPSuite.Core/Domain/Constants.cs index d6179d6c8..deaf7d855 100644 --- a/src/OSPSuite.Core/Domain/Constants.cs +++ b/src/OSPSuite.Core/Domain/Constants.cs @@ -68,6 +68,7 @@ public static class Constants public static readonly string HELP_NAMESPACE = "Open Systems Pharmacology Suite.chm"; public static readonly string LICENSE_AGREEMENT_FILE_NAME = "Open Systems Pharmacology Suite License.pdf"; public static readonly string FORUM_SITE = "forum.open-systems-pharmacology.org"; + public static readonly string SUITE_NAME = "Open Systems Pharmacology Suite"; public const float DEFAULT_WEIGHT = 1; public const double DEFAULT_USE_AS_FACTOR = 1; @@ -207,6 +208,7 @@ public static class Filter public static readonly string XLSX_EXTENSION = ".xlsx"; public static readonly string TEXT_EXTENSION = ".txt"; public static readonly string JSON_EXTENSION = ".json"; + public static readonly string DOCX_EXTENSION = ".docs"; public static readonly string DIAGRAM_IMAGE_FILTER = FileFilter("Diagram Image", PNG_EXTENSION); public static readonly string UNITS_FILE_FILTER = XmlFilter("Units"); @@ -218,7 +220,7 @@ public static class Filter public static readonly string EXCEL_SAVE_FILE_FILTER = string.Format("Excel file (*{0})|*{0}|Excel file (*{1})|*{1}", XLSX_EXTENSION, XLS_EXTENSION); public static readonly string EXCEL_OPEN_FILE_FILTER = string.Format("Excel file (*{0};*{1})|*{0};*{1}", XLS_EXTENSION, XLSX_EXTENSION); public static readonly string JOURNAL_FILE_FILTER = FileFilter("Journal File", JOURNAL_EXTENSION); - public static readonly string WORD_SAVE_FILE_FILTER = FileFilter("Word", ".docx"); + public static readonly string WORD_SAVE_FILE_FILTER = FileFilter("Word", DOCX_EXTENSION); public static readonly string PKML_FILE_FILTER = FileFilter("Shared Modeling", PKML_EXTENSION); public static readonly string HISTORY_FILE_FILTER = FileFilter("History Export", XLS_EXTENSION); public static readonly string TEXT_FILE_FILTER = FileFilter("Text", TEXT_EXTENSION); @@ -227,6 +229,9 @@ public static class Filter public static readonly string CSV_FILE_FILTER = FileFilter("CSV", CSV_EXTENSION); public static readonly string JSON_FILE_FILTER = FileFilter("Json", JSON_EXTENSION); + public static readonly string JSON_FILTER = $"*{JSON_EXTENSION}"; + public static readonly string XML_FILTER = $"*{XML_EXTENSION}"; + public static string XmlFilter(string caption) { return FileFilter(caption, XML_EXTENSION); @@ -234,7 +239,12 @@ public static string XmlFilter(string caption) public static string FileFilter(string caption, string extension) { - return $"{caption} File (*{extension})|*{extension}"; + return $"{caption} File ({filter(extension)})|{filter(extension)}"; + } + + private static string filter(string extension) + { + return $"*{extension}"; } } diff --git a/src/OSPSuite.Core/Extensions/ExceptionExtensions.cs b/src/OSPSuite.Core/Extensions/ExceptionExtensions.cs new file mode 100644 index 000000000..0d66c53d6 --- /dev/null +++ b/src/OSPSuite.Core/Extensions/ExceptionExtensions.cs @@ -0,0 +1,29 @@ +using System; +using System.Reflection; +using OSPSuite.Assets; +using OSPSuite.Core.Domain; +using OSPSuite.Utility.Extensions; + +namespace OSPSuite.Core.Extensions +{ + public static class ExceptionExtensions + { + public static string ExceptionMessage(this Exception ex) + { + if (IsWrapperException(ex)) + return ExceptionMessage(ex.InnerException); + + return $"{ex.FullMessage()}{Environment.NewLine}{Environment.NewLine}{Captions.ContactSupport(Constants.FORUM_SITE)}"; + } + + public static bool IsWrapperException(this Exception ex) + { + return ex.IsAnImplementationOf() || ex.IsAnImplementationOf(); + } + + public static string ExceptionMessageWithStackTrace(this Exception ex) + { + return $"{ExceptionMessage(ex)}{Environment.NewLine}{Environment.NewLine}Stack trace:{Environment.NewLine}{ex.FullStackTrace()}"; + } + } +} \ No newline at end of file diff --git a/src/OSPSuite.Core/IApplicationConfiguration.cs b/src/OSPSuite.Core/IApplicationConfiguration.cs index f1088d8d6..9f744d0cc 100644 --- a/src/OSPSuite.Core/IApplicationConfiguration.cs +++ b/src/OSPSuite.Core/IApplicationConfiguration.cs @@ -5,7 +5,7 @@ namespace OSPSuite.Core { /// - /// Standard interface defining common properties for all application in the suite + /// Standard interface defining common properties for all application in the suite /// public interface IApplicationConfiguration { @@ -23,9 +23,9 @@ public interface IApplicationConfiguration /// Path of the pk analyses file /// string PKParametersFilePath { get; set; } - + /// - /// Path of the license agreement file + /// Path of the license agreement file /// string LicenseAgreementFilePath { get; } @@ -50,30 +50,36 @@ public interface IApplicationConfiguration string BuildVersion { get; } /// - /// Returns the name of the application + /// Returns the name of the application /// string ProductName { get; } /// - /// Returns the product corresponding to the current application + /// Returns the product corresponding to the current application /// Origin Product { get; } /// - /// Returns the name of the application with trademark + /// Returns the name of the application with trademark /// string ProductNameWithTrademark { get; } ApplicationIcon Icon { get; } /// - /// Returns a possible enumeration containg the path of user settings that can be loaded. (Starting from the most recent one down to the first available one) + /// Returns a possible enumeration containg the path of user settings that can be loaded. (Starting from the most recent + /// one down to the first available one) /// IEnumerable UserApplicationSettingsFilePaths { get; } /// - /// Returns the url of the issue tracker + /// Returns the url of the issue tracker /// string IssueTrackerUrl { get; } + + /// + /// Returns the name of the suite with the Version in format X.Y.Z + /// + string OSPSuiteNameWithVersion { get; } } } \ No newline at end of file diff --git a/src/OSPSuite.Core/OSPSuite.Core.csproj b/src/OSPSuite.Core/OSPSuite.Core.csproj index e4c8900f8..4fc3ada99 100644 --- a/src/OSPSuite.Core/OSPSuite.Core.csproj +++ b/src/OSPSuite.Core/OSPSuite.Core.csproj @@ -140,6 +140,7 @@ + diff --git a/src/OSPSuite.Infrastructure/Configuration/OSPSuiteConfiguration.cs b/src/OSPSuite.Infrastructure/Configuration/OSPSuiteConfiguration.cs index 8aed27f90..746b11d8e 100644 --- a/src/OSPSuite.Infrastructure/Configuration/OSPSuiteConfiguration.cs +++ b/src/OSPSuite.Infrastructure/Configuration/OSPSuiteConfiguration.cs @@ -75,5 +75,6 @@ private string userApplicationSettingsFilePath(string revision) protected abstract string ApplicationFolderPathWithRevision(string revision); public virtual string LicenseAgreementFilePath { get; } = Constants.LICENSE_AGREEMENT_FILE_NAME; + public string OSPSuiteNameWithVersion => $"{Constants.SUITE_NAME} - {Version}"; } } \ No newline at end of file diff --git a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj index 892b1ca4d..9aa865ab2 100644 --- a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj +++ b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj @@ -183,6 +183,7 @@ + diff --git a/src/OSPSuite.Infrastructure/Services/StartableProcess.cs b/src/OSPSuite.Infrastructure/Services/StartableProcess.cs new file mode 100644 index 000000000..acb33ae7e --- /dev/null +++ b/src/OSPSuite.Infrastructure/Services/StartableProcess.cs @@ -0,0 +1,76 @@ +using System; +using System.Diagnostics; +using System.Threading; +using Microsoft.Win32.SafeHandles; + +namespace OSPSuite.Infrastructure.Services +{ + public class StartableProcess : IDisposable + { + private readonly Process _process; + private bool _exited; + + public StartableProcess(string filePath, params string[] arguments) + { + _process = new Process + { + StartInfo = new ProcessStartInfo + { + FileName = filePath, + Arguments = string.Join(" ", arguments) + } + }; + } + + /// + /// true if the process exited normally. If the process was stopped, returns false + /// + public bool ExitedNormally => _exited; + + /// + /// the exit code of the process if returns true. + /// throws an if the process has not exited or was aborted abnormally + /// + public int ReturnCode => _process.ExitCode; + + public virtual void Start() + { + _process?.Start(); + } + + public void Dispose() + { + _process.Dispose(); + } + + public virtual void Wait(CancellationToken token) + { + // we are passing ownsHandle = false because the started process owns the handle + // not this process. + using (var processSafeWaitHandle = new SafeWaitHandle(_process.Handle, false)) + using (var processFinishedWaitHandle = new ManualResetEvent(false)) + { + processFinishedWaitHandle.SafeWaitHandle = processSafeWaitHandle; + + var finishingWaitHandle = waitForSignal(token.WaitHandle, processFinishedWaitHandle); + + if (finishingWaitHandle == processFinishedWaitHandle) + { + _exited = true; + return; + } + _process.Kill(); + token.ThrowIfCancellationRequested(); + } + } + + private static WaitHandle waitForSignal(WaitHandle token, WaitHandle processFinishedEvent) + { + var waitHandles = new[] { processFinishedEvent, token }; + + var index = WaitHandle.WaitAny(waitHandles); + + return waitHandles[index]; + } + } +} diff --git a/src/OSPSuite.Presentation/Services/ExceptionManager.cs b/src/OSPSuite.Presentation/Services/ExceptionManager.cs index 01d5b2f25..db58ef81f 100644 --- a/src/OSPSuite.Presentation/Services/ExceptionManager.cs +++ b/src/OSPSuite.Presentation/Services/ExceptionManager.cs @@ -1,13 +1,12 @@ using System; -using System.Reflection; -using OSPSuite.Assets; -using OSPSuite.Utility.Exceptions; -using OSPSuite.Utility.Extensions; using OSPSuite.Core; using OSPSuite.Core.Domain; +using OSPSuite.Core.Extensions; using OSPSuite.Core.Maths.Statistics; using OSPSuite.Core.Services; using OSPSuite.Presentation.Views; +using OSPSuite.Utility.Exceptions; +using OSPSuite.Utility.Extensions; namespace OSPSuite.Presentation.Services { @@ -29,7 +28,7 @@ public override void LogException(Exception ex) { if (isInfoException(ex)) { - var message = ExceptionMessageFrom(ex); + var message = ex.ExceptionMessage(); _dialogCreator.MessageBoxInfo(message); this.LogInfo(message); } @@ -57,7 +56,7 @@ private static bool isInfoException(Exception ex) if (ex == null) return false; - if (isWrapperException(ex)) + if (ex.IsWrapperException()) return isInfoException(ex.InnerException); if (ex.IsAnImplementationOf()) @@ -65,23 +64,5 @@ private static bool isInfoException(Exception ex) return ex.IsAnImplementationOf() || ex.IsAnImplementationOf(); } - - public static string ExceptionMessageFrom(Exception ex) - { - if (isWrapperException(ex)) - return ExceptionMessageFrom(ex.InnerException); - - return $"{ex.FullMessage()}\n{Captions.ContactSupport(Constants.FORUM_SITE)}"; - } - - private static bool isWrapperException(Exception ex) - { - return ex.IsAnImplementationOf() || ex.IsAnImplementationOf(); - } - - public static string ExceptionMessageWithStackTraceFrom(Exception ex) - { - return $"{ExceptionMessageFrom(ex)}\n\nStack trace:\n{ex.FullStackTrace()}"; - } } } \ No newline at end of file diff --git a/tests/OSPSuite.Starter/Tasks/ApplicationConfiguration.cs b/tests/OSPSuite.Starter/Tasks/ApplicationConfiguration.cs index 6705d9345..107e29d0a 100644 --- a/tests/OSPSuite.Starter/Tasks/ApplicationConfiguration.cs +++ b/tests/OSPSuite.Starter/Tasks/ApplicationConfiguration.cs @@ -69,5 +69,6 @@ public ApplicationIcon Icon public string LicenseAgreementFilePath { get; } public string IssueTrackerUrl => "https://github.com/Open-Systems-Pharmacology/PK-Sim/issues"; + public string OSPSuiteNameWithVersion => $"OSPSuite - {Version}"; } } \ No newline at end of file From 57bc7b9495be6e8960b9fe0444ac319bbeb00ddf Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 4 May 2017 16:11:41 -0400 Subject: [PATCH 38/50] Fixes #66 rename simulation error (#67) --- .../OptimizationRunResult.cs | 11 +++--- .../Core/OptimizationRunResultSpecs.cs | 35 +++++++++++++++++++ .../OSPSuite.Core.Tests.csproj | 1 + 3 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 tests/OSPSuite.Core.Tests/Core/OptimizationRunResultSpecs.cs diff --git a/src/OSPSuite.Core/Domain/ParameterIdentifications/OptimizationRunResult.cs b/src/OSPSuite.Core/Domain/ParameterIdentifications/OptimizationRunResult.cs index 2d19b7c39..8e4001358 100644 --- a/src/OSPSuite.Core/Domain/ParameterIdentifications/OptimizationRunResult.cs +++ b/src/OSPSuite.Core/Domain/ParameterIdentifications/OptimizationRunResult.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -using OSPSuite.Utility.Extensions; using OSPSuite.Core.Domain.Data; +using OSPSuite.Utility.Extensions; namespace OSPSuite.Core.Domain.ParameterIdentifications { @@ -42,7 +42,7 @@ public virtual IReadOnlyList Values public virtual IReadOnlyList SimulationResults { - get { return _simulationResults;} + get { return _simulationResults; } set { _simulationResults.Clear(); @@ -53,12 +53,12 @@ public virtual IReadOnlyList SimulationResults private void updateResultsOrigin() { - _simulationResults.SelectMany(x=>x.AllButBaseGrid()).Each(x=>x.DataInfo.Origin = ColumnOrigins.CalculationAuxiliary); + _simulationResults.SelectMany(x => x.AllButBaseGrid()).Each(x => x.DataInfo.Origin = ColumnOrigins.CalculationAuxiliary); } public virtual double TotalError => ResidualsResult?.TotalError ?? double.PositiveInfinity; - public virtual IReadOnlyCollection AllOutputResiduals => ResidualsResult?.AllOutputResiduals; - public virtual IReadOnlyList AllResiduals => ResidualsResult?.AllResiduals; + public virtual IReadOnlyCollection AllOutputResiduals => ResidualsResult?.AllOutputResiduals ?? new List(); + public virtual IReadOnlyList AllResiduals => ResidualsResult?.AllResiduals ?? new List(); public virtual IReadOnlyList AllResidualValues { @@ -79,6 +79,5 @@ public virtual IEnumerable AllResidualsFor(string fullOutputPath) { return ResidualsResult.AllOutputResidualsFor(fullOutputPath).SelectMany(x => x.Residuals); } - } } \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/Core/OptimizationRunResultSpecs.cs b/tests/OSPSuite.Core.Tests/Core/OptimizationRunResultSpecs.cs new file mode 100644 index 000000000..91b92c6d3 --- /dev/null +++ b/tests/OSPSuite.Core.Tests/Core/OptimizationRunResultSpecs.cs @@ -0,0 +1,35 @@ +using OSPSuite.BDDHelper; +using OSPSuite.BDDHelper.Extensions; +using OSPSuite.Core.Domain.ParameterIdentifications; + +namespace OSPSuite.Core +{ + public abstract class concern_for_OptimizationRunResult : ContextSpecification + { + protected override void Context() + { + sut = new OptimizationRunResult(); + } + } + + public class When_creating_an_optimization_run_results : concern_for_OptimizationRunResult + { + [Observation] + public void should_have_a_default_total_error_of_infinity() + { + double.IsPositiveInfinity(sut.TotalError).ShouldBeTrue(); + } + + [Observation] + public void should_have_an_empty_list_of_residuals() + { + sut.AllResiduals.Count.ShouldBeEqualTo(0); + } + + [Observation] + public void should_have_an_empty_list_of_output_residuals() + { + sut.AllOutputResiduals.Count.ShouldBeEqualTo(0); + } + } +} \ No newline at end of file diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index 891a34546..367b1874c 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -173,6 +173,7 @@ + From 9bddd417ac833a8d8755b98082e4fa2fec9e03d1 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Fri, 5 May 2017 11:21:25 -0400 Subject: [PATCH 39/50] Fixes #70 move startable factory to core (#71) --- src/OSPSuite.Core/CoreRegister.cs | 5 +++-- src/OSPSuite.Core/OSPSuite.Core.csproj | 8 +++++--- .../Services/IStartableProcessFactory.cs | 13 +++++++++++++ .../Services/StartableProcess.cs | 2 +- src/OSPSuite.Core/packages.config | 2 +- .../OSPSuite.Infrastructure.csproj | 7 +++---- src/OSPSuite.Infrastructure/packages.config | 2 +- .../OSPSuite.Presentation.csproj | 5 +++-- src/OSPSuite.Presentation/packages.config | 2 +- src/OSPSuite.UI/OSPSuite.UI.csproj | 5 +++-- src/OSPSuite.UI/packages.config | 2 +- .../OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj | 5 +++-- tests/OSPSuite.Core.Tests/packages.config | 2 +- 13 files changed, 39 insertions(+), 21 deletions(-) create mode 100644 src/OSPSuite.Core/Services/IStartableProcessFactory.cs rename src/{OSPSuite.Infrastructure => OSPSuite.Core}/Services/StartableProcess.cs (98%) diff --git a/src/OSPSuite.Core/CoreRegister.cs b/src/OSPSuite.Core/CoreRegister.cs index a306a859b..895535a94 100644 --- a/src/OSPSuite.Core/CoreRegister.cs +++ b/src/OSPSuite.Core/CoreRegister.cs @@ -12,6 +12,7 @@ using OSPSuite.Core.Domain.UnitSystem; using OSPSuite.Core.Serialization; using OSPSuite.Core.Serialization.Xml; +using OSPSuite.Core.Services; using OSPSuite.Utility.Container; using IContainer = OSPSuite.Utility.Container.IContainer; @@ -54,10 +55,9 @@ public override void RegisterInContainer(IContainer container) scan.ExcludeType(); scan.ExcludeType(); - //PKSim registers its own implementation + //PK-Sim registers its own implementation scan.ExcludeType(); - if (!RegisterParameter) { scan.ExcludeType(); @@ -89,6 +89,7 @@ public override void RegisterInContainer(IContainer container) container.RegisterFactory(); container.RegisterFactory(); container.RegisterFactory(); + container.RegisterFactory(); //Register Optimization algorithm explicitely container.Register(Constants.OptimizationAlgorithm.NELDER_MEAD_PKSIM); diff --git a/src/OSPSuite.Core/OSPSuite.Core.csproj b/src/OSPSuite.Core/OSPSuite.Core.csproj index 4fc3ada99..f29274498 100644 --- a/src/OSPSuite.Core/OSPSuite.Core.csproj +++ b/src/OSPSuite.Core/OSPSuite.Core.csproj @@ -77,9 +77,9 @@ ..\..\packages\OSPSuite.SimModel.2.0.0.12\lib\net45\OSPSuite.SimModel.dll True - - False - ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll + + ..\..\packages\OSPSuite.TeXReporting.2.0.0.4\lib\net45\OSPSuite.TeXReporting.dll + True ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll @@ -507,6 +507,7 @@ + @@ -1029,6 +1030,7 @@ + diff --git a/src/OSPSuite.Core/Services/IStartableProcessFactory.cs b/src/OSPSuite.Core/Services/IStartableProcessFactory.cs new file mode 100644 index 000000000..d241d4216 --- /dev/null +++ b/src/OSPSuite.Core/Services/IStartableProcessFactory.cs @@ -0,0 +1,13 @@ +namespace OSPSuite.Core.Services +{ + public interface IStartableProcessFactory + { + /// + /// Starts the application located at with the given + /// + /// Full path of application to start + /// Command line arguments + /// A monitoring the application located at + StartableProcess CreateStartableProcess(string applicationPath, params string[] arguments); + } +} \ No newline at end of file diff --git a/src/OSPSuite.Infrastructure/Services/StartableProcess.cs b/src/OSPSuite.Core/Services/StartableProcess.cs similarity index 98% rename from src/OSPSuite.Infrastructure/Services/StartableProcess.cs rename to src/OSPSuite.Core/Services/StartableProcess.cs index acb33ae7e..c98a322bb 100644 --- a/src/OSPSuite.Infrastructure/Services/StartableProcess.cs +++ b/src/OSPSuite.Core/Services/StartableProcess.cs @@ -3,7 +3,7 @@ using System.Threading; using Microsoft.Win32.SafeHandles; -namespace OSPSuite.Infrastructure.Services +namespace OSPSuite.Core.Services { public class StartableProcess : IDisposable { diff --git a/src/OSPSuite.Core/packages.config b/src/OSPSuite.Core/packages.config index f39587b7d..a2c63928f 100644 --- a/src/OSPSuite.Core/packages.config +++ b/src/OSPSuite.Core/packages.config @@ -5,6 +5,6 @@ - + \ No newline at end of file diff --git a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj index 9aa865ab2..f65761aa7 100644 --- a/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj +++ b/src/OSPSuite.Infrastructure/OSPSuite.Infrastructure.csproj @@ -72,9 +72,9 @@ ..\..\packages\NHibernate.4.1.1.4000\lib\net40\NHibernate.dll True - - False - ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll + + ..\..\packages\OSPSuite.TeXReporting.2.0.0.4\lib\net45\OSPSuite.TeXReporting.dll + True ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll @@ -183,7 +183,6 @@ - diff --git a/src/OSPSuite.Infrastructure/packages.config b/src/OSPSuite.Infrastructure/packages.config index 85997052a..f42f9c212 100644 --- a/src/OSPSuite.Infrastructure/packages.config +++ b/src/OSPSuite.Infrastructure/packages.config @@ -9,7 +9,7 @@ - + diff --git a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj index 4197486c4..9849d6936 100644 --- a/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj +++ b/src/OSPSuite.Presentation/OSPSuite.Presentation.csproj @@ -45,8 +45,9 @@ ..\..\packages\OSPSuite.Serializer.2.0.0.1\lib\net45\OSPSuite.Serializer.dll - - ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll + + ..\..\packages\OSPSuite.TeXReporting.2.0.0.4\lib\net45\OSPSuite.TeXReporting.dll + True ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll diff --git a/src/OSPSuite.Presentation/packages.config b/src/OSPSuite.Presentation/packages.config index 53b268691..786e54542 100644 --- a/src/OSPSuite.Presentation/packages.config +++ b/src/OSPSuite.Presentation/packages.config @@ -3,6 +3,6 @@ - + \ No newline at end of file diff --git a/src/OSPSuite.UI/OSPSuite.UI.csproj b/src/OSPSuite.UI/OSPSuite.UI.csproj index 1dc14cfea..413be7252 100644 --- a/src/OSPSuite.UI/OSPSuite.UI.csproj +++ b/src/OSPSuite.UI/OSPSuite.UI.csproj @@ -164,8 +164,9 @@ ..\..\packages\OSPSuite.DataBinding.DevExpress.2.0.0.3\lib\net45\OSPSuite.DataBinding.DevExpress.dll True - - ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll + + ..\..\packages\OSPSuite.TeXReporting.2.0.0.4\lib\net45\OSPSuite.TeXReporting.dll + True ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll diff --git a/src/OSPSuite.UI/packages.config b/src/OSPSuite.UI/packages.config index e1c16c409..2cfc7b883 100644 --- a/src/OSPSuite.UI/packages.config +++ b/src/OSPSuite.UI/packages.config @@ -5,7 +5,7 @@ - + diff --git a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj index 367b1874c..3c3db86cc 100644 --- a/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj +++ b/tests/OSPSuite.Core.Tests/OSPSuite.Core.Tests.csproj @@ -108,8 +108,9 @@ ..\..\packages\OSPSuite.SimModel.2.0.0.12\lib\net45\OSPSuite.SimModel.dll True - - ..\..\packages\OSPSuite.TeXReporting.2.0.0.1\lib\net45\OSPSuite.TeXReporting.dll + + ..\..\packages\OSPSuite.TeXReporting.2.0.0.4\lib\net45\OSPSuite.TeXReporting.dll + True ..\..\packages\OSPSuite.Utility.2.0.0.5\lib\net45\OSPSuite.Utility.dll diff --git a/tests/OSPSuite.Core.Tests/packages.config b/tests/OSPSuite.Core.Tests/packages.config index ef8782499..b3c589105 100644 --- a/tests/OSPSuite.Core.Tests/packages.config +++ b/tests/OSPSuite.Core.Tests/packages.config @@ -16,6 +16,6 @@ - + \ No newline at end of file From 196ed85769315db9c701c55def0d6f2dc112e2cd Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Fri, 5 May 2017 11:35:11 -0400 Subject: [PATCH 40/50] Update parameter name --- src/OSPSuite.Core/Services/StartableProcess.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OSPSuite.Core/Services/StartableProcess.cs b/src/OSPSuite.Core/Services/StartableProcess.cs index c98a322bb..53dab2cc8 100644 --- a/src/OSPSuite.Core/Services/StartableProcess.cs +++ b/src/OSPSuite.Core/Services/StartableProcess.cs @@ -10,13 +10,13 @@ public class StartableProcess : IDisposable private readonly Process _process; private bool _exited; - public StartableProcess(string filePath, params string[] arguments) + public StartableProcess(string applicationPath, params string[] arguments) { _process = new Process { StartInfo = new ProcessStartInfo { - FileName = filePath, + FileName = applicationPath, Arguments = string.Join(" ", arguments) } }; From f0fd0603ce501810c1d4a6de1041803eef66dc9d Mon Sep 17 00:00:00 2001 From: Robert McIntosh Date: Mon, 8 May 2017 15:11:20 -0400 Subject: [PATCH 41/50] WIP Open-Systems-Pharmacology/InstallationValidator#88 (#73) * moved message to core and modified exceptionview * refactor html styling and message into captions * rename variable * add custom control for html label * add custom control for html label * add custom control for html label * PR rework * PR rework --- src/OSPSuite.Assets/UIConstants.cs | 34 +++++--- src/OSPSuite.UI/Controls/UxHtmlLabel.cs | 84 +++++++++++++++++++ src/OSPSuite.UI/OSPSuite.UI.csproj | 3 + src/OSPSuite.UI/Properties/licenses.licx | 13 +-- src/OSPSuite.UI/UIConstants.cs | 4 + .../Views/ExceptionView.Designer.cs | 83 +++++++++--------- src/OSPSuite.UI/Views/ExceptionView.cs | 13 +-- .../Presenters/ImporterTestPresenter.cs | 3 +- 8 files changed, 173 insertions(+), 64 deletions(-) create mode 100644 src/OSPSuite.UI/Controls/UxHtmlLabel.cs diff --git a/src/OSPSuite.Assets/UIConstants.cs b/src/OSPSuite.Assets/UIConstants.cs index e0950cce2..74f79acc6 100644 --- a/src/OSPSuite.Assets/UIConstants.cs +++ b/src/OSPSuite.Assets/UIConstants.cs @@ -241,19 +241,31 @@ public static string DoYouWantToDeleteDirectory(string newDirectoryName) return $"Do you want to delete the directory '{newDirectoryName}' and continue?"; } + public static void AppendListItem(string listItem, StringBuilder sb) + { + sb.Append($"
  • {listItem}
  • "); + } + + public static void AppendLine(string lineToAppend, StringBuilder sb) + { + sb.Append($"

    {lineToAppend}

    "); + } + public static string ExceptionViewDescription(string issueTrackerUrl) { var sb = new StringBuilder(); - sb.AppendLine("oops...something went terribly wrong."); - sb.AppendLine(); - sb.AppendLine("To best address the error, please enter an issue in our issue tracker:"); - sb.AppendLine($" 1 - Visit {issueTrackerUrl} or click on the link below"); - sb.AppendLine(" 2 - Click on the New Issue button"); - sb.AppendLine(" 3 - Describe the steps you took prior to the problem emerging"); - sb.AppendLine($" 4 - Copy the information below by using the {CopyToClipboard} button and paste it in the issue description"); - sb.AppendLine(" 5 - if possible, attach your project file to the issue (do not attach confidential information)"); - sb.AppendLine(); - sb.AppendLine("Note: A GitHub account is required to create an issue"); + AppendLine("oops...something went terribly wrong.", sb); + AppendLine(string.Empty, sb); + AppendLine("To best address the error, please enter an issue in our issue tracker:", sb); + sb.Append("
      "); + AppendListItem($"Visit {issueTrackerUrl} or click on the link below", sb); + AppendListItem("Click on the New Issue button", sb); + AppendListItem("Describe the steps you took prior to the problem emerging", sb); + AppendListItem($"Copy the information below by using the {CopyToClipboard} button and paste it in the issue description", sb); + AppendListItem("if possible, attach your project file to the issue (do not attach confidential information)", sb); + sb.Append("
    "); + AppendLine(string.Empty, sb); + AppendLine("Note: A GitHub account is required to create an issue", sb); return sb.ToString(); } @@ -294,7 +306,7 @@ public static class Importer public static readonly string TheUnitInformationMustBeEnteredOrConfirmed = "The unit information must be entered or confirmed."; public static readonly string TheMetaDataInformationMustBeEnteredOrConfirmed = "The meta data must be entered or confirmed."; - + public class ToolTips { public static readonly string NamingPattern = "Set a pattern for renaming imported data"; diff --git a/src/OSPSuite.UI/Controls/UxHtmlLabel.cs b/src/OSPSuite.UI/Controls/UxHtmlLabel.cs new file mode 100644 index 000000000..a0e447f02 --- /dev/null +++ b/src/OSPSuite.UI/Controls/UxHtmlLabel.cs @@ -0,0 +1,84 @@ +using System; +using System.Drawing; +using DevExpress.Utils.Controls; +using DevExpress.XtraEditors.Controls; +using DevExpress.XtraRichEdit; + +namespace OSPSuite.UI.Controls +{ + public class UxHtmlLabel : UxRichEditControl, IXtraResizableControl + { + private static readonly object _layoutInfoChanged = new object(); + private static string _fontFamily; + private static double _fontSize; + + public UxHtmlLabel(string fontFamily, double fontSize) + { + _fontSize = fontSize; + _fontFamily = fontFamily; + + AutoSizeMode = AutoSizeMode.Vertical; + Options.VerticalScrollbar.Visibility = RichEditScrollbarVisibility.Hidden; + ActiveView.BackColor = BackColor; + BorderStyle = BorderStyles.NoBorder; + PopupMenuShowing += (o, e) => e.Menu.Items.Clear(); + Enabled = false; + Views.SimpleView.Padding = new System.Windows.Forms.Padding(0); + ActiveViewType = RichEditViewType.Simple; + } + + public UxHtmlLabel() : this(UIConstants.DEFAULT_HTML_FONT, UIConstants.DEFAULT_HTML_FONT_SIZE) + { + + } + + event EventHandler IXtraResizableControl.Changed + { + add + { + Events.AddHandler(_layoutInfoChanged, value); + } + remove + { + Events.RemoveHandler(_layoutInfoChanged, value); + } + } + protected void RaiseChanged() + { + var changed = (EventHandler)Events[_layoutInfoChanged]; + changed?.Invoke(this, EventArgs.Empty); + } + + bool IXtraResizableControl.IsCaptionVisible => false; + + Size IXtraResizableControl.MaxSize => Size; + + Size IXtraResizableControl.MinSize => Size; + + protected override void OnSizeChanged(EventArgs e) + { + base.OnSizeChanged(e); + RaiseChanged(); + } + + public void Caption(string caption, string fontFamily = "", double? fontSize = 8.25) + { + Document.HtmlText = stylizeHtmlText(fontFamily, fontSize) + $"
    {caption}
    "; + } + + private static string stylizeHtmlText(string fontFamily, double? fontSize) + { + return $@" + "; + } + } +} \ No newline at end of file diff --git a/src/OSPSuite.UI/OSPSuite.UI.csproj b/src/OSPSuite.UI/OSPSuite.UI.csproj index 413be7252..20d1ad100 100644 --- a/src/OSPSuite.UI/OSPSuite.UI.csproj +++ b/src/OSPSuite.UI/OSPSuite.UI.csproj @@ -276,6 +276,9 @@ Component + + Component + Component diff --git a/src/OSPSuite.UI/Properties/licenses.licx b/src/OSPSuite.UI/Properties/licenses.licx index a7a4592fb..f01a95d1b 100644 --- a/src/OSPSuite.UI/Properties/licenses.licx +++ b/src/OSPSuite.UI/Properties/licenses.licx @@ -1,6 +1,7 @@ -DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v16.2, Version=16.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v16.2, Version=16.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v16.2, Version=16.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v16.2, Version=16.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v16.2, Version=16.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v16.2, Version=16.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v16.2, Version=16.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v16.2, Version=16.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v16.2, Version=16.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v16.2, Version=16.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v16.2, Version=16.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v16.2, Version=16.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraRichEdit.RichEditControl, DevExpress.XtraRichEdit.v16.2, Version=16.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/src/OSPSuite.UI/UIConstants.cs b/src/OSPSuite.UI/UIConstants.cs index a142a4911..c6e0e82e8 100644 --- a/src/OSPSuite.UI/UIConstants.cs +++ b/src/OSPSuite.UI/UIConstants.cs @@ -11,6 +11,8 @@ public static class UIConstants public const int TOOL_TIP_INITIAL_DELAY_LONG = 1500; public const string EMPTY_COLUMN = " "; + public const double DEFAULT_HTML_FONT_SIZE = 8.25; + /// /// Size used for icons displayed in tab /// @@ -26,6 +28,8 @@ public static class UIConstants ///
    public static IconSize ICON_SIZE_TREE_VIEW = IconSizes.Size24x24; + public const string DEFAULT_HTML_FONT = "Tahoma"; + public static class Size { private static readonly double _scaleFactor = createScaleFactor(); diff --git a/src/OSPSuite.UI/Views/ExceptionView.Designer.cs b/src/OSPSuite.UI/Views/ExceptionView.Designer.cs index 09db07ab2..1ae747f91 100644 --- a/src/OSPSuite.UI/Views/ExceptionView.Designer.cs +++ b/src/OSPSuite.UI/Views/ExceptionView.Designer.cs @@ -1,4 +1,6 @@ -namespace OSPSuite.UI.Views +using OSPSuite.UI.Controls; + +namespace OSPSuite.UI.Views { partial class ExceptionView { @@ -34,7 +36,6 @@ private void InitializeComponent() this.tbException = new DevExpress.XtraEditors.MemoEdit(); this.tbFullException = new DevExpress.XtraEditors.MemoEdit(); this.btnClose = new DevExpress.XtraEditors.SimpleButton(); - this.lblDescription = new DevExpress.XtraEditors.LabelControl(); this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutItemOk = new DevExpress.XtraLayout.LayoutControlItem(); this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); @@ -43,9 +44,10 @@ private void InitializeComponent() this.layoutGroupException = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutItemException = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutItemCopyToClipbord = new DevExpress.XtraLayout.LayoutControlItem(); - this.layoutItemDescription = new DevExpress.XtraLayout.LayoutControlItem(); this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); this.layoutItemIssueTracker = new DevExpress.XtraLayout.LayoutControlItem(); + this.htmlLabel = new UxHtmlLabel(); + this.layoutItemDescription = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl)).BeginInit(); this.layoutControl.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.issueTrackerLink.Properties)).BeginInit(); @@ -59,19 +61,19 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.layoutGroupException)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutItemException)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutItemCopyToClipbord)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutItemDescription)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutItemIssueTracker)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutItemDescription)).BeginInit(); this.SuspendLayout(); // // layoutControl // + this.layoutControl.Controls.Add(this.htmlLabel); this.layoutControl.Controls.Add(this.issueTrackerLink); this.layoutControl.Controls.Add(this.btnCopyToClipboard); this.layoutControl.Controls.Add(this.tbException); this.layoutControl.Controls.Add(this.tbFullException); this.layoutControl.Controls.Add(this.btnClose); - this.layoutControl.Controls.Add(this.lblDescription); this.layoutControl.Dock = System.Windows.Forms.DockStyle.Fill; this.layoutControl.Location = new System.Drawing.Point(0, 0); this.layoutControl.Name = "layoutControl"; @@ -84,7 +86,7 @@ private void InitializeComponent() // issueTrackerLink // this.issueTrackerLink.EditValue = "issueTrackerLink"; - this.issueTrackerLink.Location = new System.Drawing.Point(12, 29); + this.issueTrackerLink.Location = new System.Drawing.Point(12, 36); this.issueTrackerLink.Name = "issueTrackerLink"; this.issueTrackerLink.Properties.Appearance.BackColor = System.Drawing.Color.Transparent; this.issueTrackerLink.Properties.Appearance.Options.UseBackColor = true; @@ -95,7 +97,7 @@ private void InitializeComponent() // // btnCopyToClipboard // - this.btnCopyToClipboard.Location = new System.Drawing.Point(382, 29); + this.btnCopyToClipboard.Location = new System.Drawing.Point(382, 36); this.btnCopyToClipboard.Name = "btnCopyToClipboard"; this.btnCopyToClipboard.Size = new System.Drawing.Size(269, 22); this.btnCopyToClipboard.StyleController = this.layoutControl; @@ -104,9 +106,9 @@ private void InitializeComponent() // // tbException // - this.tbException.Location = new System.Drawing.Point(142, 87); + this.tbException.Location = new System.Drawing.Point(142, 92); this.tbException.Name = "tbException"; - this.tbException.Size = new System.Drawing.Size(497, 163); + this.tbException.Size = new System.Drawing.Size(497, 162); this.tbException.StyleController = this.layoutControl; this.tbException.TabIndex = 6; // @@ -128,15 +130,6 @@ private void InitializeComponent() this.btnClose.TabIndex = 4; this.btnClose.Text = "OK"; // - // lblDescription - // - this.lblDescription.Location = new System.Drawing.Point(12, 12); - this.lblDescription.Name = "lblDescription"; - this.lblDescription.Size = new System.Drawing.Size(63, 13); - this.lblDescription.StyleController = this.layoutControl; - this.lblDescription.TabIndex = 7; - this.lblDescription.Text = "lblDescription"; - // // layoutControlGroup1 // this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1"; @@ -148,9 +141,9 @@ private void InitializeComponent() this.layoutGroupStackTraceException, this.layoutGroupException, this.layoutItemCopyToClipbord, - this.layoutItemDescription, this.emptySpaceItem2, - this.layoutItemIssueTracker}); + this.layoutItemIssueTracker, + this.layoutItemDescription}); this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0); this.layoutControlGroup1.Name = "layoutControlGroup1"; this.layoutControlGroup1.Size = new System.Drawing.Size(663, 522); @@ -181,9 +174,9 @@ private void InitializeComponent() this.layoutGroupStackTraceException.ExpandButtonVisible = true; this.layoutGroupStackTraceException.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { this.layoutItemFullException}); - this.layoutGroupStackTraceException.Location = new System.Drawing.Point(0, 254); + this.layoutGroupStackTraceException.Location = new System.Drawing.Point(0, 258); this.layoutGroupStackTraceException.Name = "layoutGroupFullException"; - this.layoutGroupStackTraceException.Size = new System.Drawing.Size(643, 222); + this.layoutGroupStackTraceException.Size = new System.Drawing.Size(643, 218); // // layoutItemFullException // @@ -199,9 +192,9 @@ private void InitializeComponent() this.layoutGroupException.CustomizationFormText = "layoutControlGroup2"; this.layoutGroupException.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { this.layoutItemException}); - this.layoutGroupException.Location = new System.Drawing.Point(0, 43); + this.layoutGroupException.Location = new System.Drawing.Point(0, 50); this.layoutGroupException.Name = "layoutGroupException"; - this.layoutGroupException.Size = new System.Drawing.Size(643, 211); + this.layoutGroupException.Size = new System.Drawing.Size(643, 208); // // layoutItemException // @@ -209,34 +202,24 @@ private void InitializeComponent() this.layoutItemException.CustomizationFormText = "layoutItemException"; this.layoutItemException.Location = new System.Drawing.Point(0, 0); this.layoutItemException.Name = "layoutItemException"; - this.layoutItemException.Size = new System.Drawing.Size(619, 167); + this.layoutItemException.Size = new System.Drawing.Size(619, 166); this.layoutItemException.TextSize = new System.Drawing.Size(115, 13); // // layoutItemCopyToClipbord // this.layoutItemCopyToClipbord.Control = this.btnCopyToClipboard; this.layoutItemCopyToClipbord.CustomizationFormText = "layoutItemCopyToClipbord"; - this.layoutItemCopyToClipbord.Location = new System.Drawing.Point(370, 17); + this.layoutItemCopyToClipbord.Location = new System.Drawing.Point(370, 24); this.layoutItemCopyToClipbord.Name = "layoutItemCopyToClipbord"; this.layoutItemCopyToClipbord.Size = new System.Drawing.Size(273, 26); this.layoutItemCopyToClipbord.TextSize = new System.Drawing.Size(0, 0); this.layoutItemCopyToClipbord.TextVisible = false; // - // layoutItemDescription - // - this.layoutItemDescription.Control = this.lblDescription; - this.layoutItemDescription.CustomizationFormText = "layoutItemDescription"; - this.layoutItemDescription.Location = new System.Drawing.Point(0, 0); - this.layoutItemDescription.Name = "layoutItemDescription"; - this.layoutItemDescription.Size = new System.Drawing.Size(643, 17); - this.layoutItemDescription.TextSize = new System.Drawing.Size(0, 0); - this.layoutItemDescription.TextVisible = false; - // // emptySpaceItem2 // this.emptySpaceItem2.AllowHotTrack = false; this.emptySpaceItem2.CustomizationFormText = "emptySpaceItem2"; - this.emptySpaceItem2.Location = new System.Drawing.Point(276, 17); + this.emptySpaceItem2.Location = new System.Drawing.Point(276, 24); this.emptySpaceItem2.Name = "emptySpaceItem2"; this.emptySpaceItem2.Size = new System.Drawing.Size(94, 26); this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); @@ -244,12 +227,30 @@ private void InitializeComponent() // layoutItemIssueTracker // this.layoutItemIssueTracker.Control = this.issueTrackerLink; - this.layoutItemIssueTracker.Location = new System.Drawing.Point(0, 17); + this.layoutItemIssueTracker.Location = new System.Drawing.Point(0, 24); this.layoutItemIssueTracker.Name = "layoutItemIssueTracker"; this.layoutItemIssueTracker.Size = new System.Drawing.Size(276, 26); this.layoutItemIssueTracker.TextSize = new System.Drawing.Size(0, 0); this.layoutItemIssueTracker.TextVisible = false; // + // richEditControl + // + this.htmlLabel.Location = new System.Drawing.Point(12, 12); + this.htmlLabel.Name = "htmlLabel"; + this.htmlLabel.Options.Export.Rtf.ExportTheme = true; + this.htmlLabel.Size = new System.Drawing.Size(639, 20); + this.htmlLabel.TabIndex = 10; + this.htmlLabel.Text = "richEditControl1"; + // + // layoutItemDescription + // + this.layoutItemDescription.Control = this.htmlLabel; + this.layoutItemDescription.Location = new System.Drawing.Point(0, 0); + this.layoutItemDescription.Name = "layoutItemDescription"; + this.layoutItemDescription.Size = new System.Drawing.Size(643, 24); + this.layoutItemDescription.TextSize = new System.Drawing.Size(0, 0); + this.layoutItemDescription.TextVisible = false; + // // ExceptionView // this.AcceptButton = this.btnClose; @@ -275,9 +276,9 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.layoutGroupException)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutItemException)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutItemCopyToClipbord)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutItemDescription)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutItemIssueTracker)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutItemDescription)).EndInit(); this.ResumeLayout(false); } @@ -295,12 +296,12 @@ private void InitializeComponent() private DevExpress.XtraLayout.LayoutControlItem layoutItemFullException; private DevExpress.XtraLayout.LayoutControlGroup layoutGroupException; private DevExpress.XtraLayout.LayoutControlItem layoutItemException; - private DevExpress.XtraEditors.LabelControl lblDescription; - private DevExpress.XtraLayout.LayoutControlItem layoutItemDescription; private DevExpress.XtraEditors.SimpleButton btnCopyToClipboard; private DevExpress.XtraLayout.LayoutControlItem layoutItemCopyToClipbord; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; private DevExpress.XtraEditors.HyperLinkEdit issueTrackerLink; private DevExpress.XtraLayout.LayoutControlItem layoutItemIssueTracker; + private UxHtmlLabel htmlLabel; + private DevExpress.XtraLayout.LayoutControlItem layoutItemDescription; } } \ No newline at end of file diff --git a/src/OSPSuite.UI/Views/ExceptionView.cs b/src/OSPSuite.UI/Views/ExceptionView.cs index 048ceda61..d09ceb89d 100644 --- a/src/OSPSuite.UI/Views/ExceptionView.cs +++ b/src/OSPSuite.UI/Views/ExceptionView.cs @@ -1,9 +1,11 @@ using System; +using System.Drawing; using System.Threading; using System.Windows.Forms; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; using DevExpress.XtraLayout.Utils; +using DevExpress.XtraRichEdit; using OSPSuite.Assets; using OSPSuite.Presentation.Views; using OSPSuite.UI.Extensions; @@ -32,8 +34,7 @@ private void initializeResources() layoutItemFullException.TextVisible = false; tbException.Properties.ReadOnly = true; tbFullException.Properties.ReadOnly = true; - lblDescription.AutoSizeMode = LabelAutoSizeMode.Vertical; - lblDescription.AllowHtmlString = true; + MinimizeBox = false; MaximizeBox = false; btnCopyToClipboard.Text = Captions.CopyToClipboard; @@ -44,6 +45,8 @@ private void initializeResources() layoutGroupStackTraceException.Text = Captions.StackTrace; issueTrackerLink.OpenLink += (o, e) => goToIssueTracker(e); ActiveControl = btnClose; + layoutItemDescription.TextVisible = false; + htmlLabel.ActiveView.BackColor = BackColor; } private void goToIssueTracker(OpenLinkEventArgs e) @@ -56,7 +59,7 @@ public string Description set { layoutItemDescription.Visibility = LayoutVisibilityConvertor.FromBoolean(!string.IsNullOrEmpty(value)); - lblDescription.Text = value; + htmlLabel.Caption(value); } } @@ -101,7 +104,7 @@ private void copyToClipboardOnUIThread() Clipboard.SetText(_cliboardContent); } - + private void showException(string message) { XtraMessageBox.Show(this, message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -134,7 +137,7 @@ private void showDialogWithOwner() { try { - ShowDialog((Form) MainView); + ShowDialog((Form)MainView); } catch (Exception) { diff --git a/tests/OSPSuite.Starter/Presenters/ImporterTestPresenter.cs b/tests/OSPSuite.Starter/Presenters/ImporterTestPresenter.cs index ca2045e79..93b042c6e 100644 --- a/tests/OSPSuite.Starter/Presenters/ImporterTestPresenter.cs +++ b/tests/OSPSuite.Starter/Presenters/ImporterTestPresenter.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using DevExpress.XtraEditors; using OSPSuite.Core.Domain; From 3e9f7e47f4f5e1bb6435136d068bb65a4e0df08c Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Wed, 10 May 2017 15:28:37 -0400 Subject: [PATCH 42/50] Fixes #74 Update to UxHtmlLabel to make it usable in other components (#75) --- src/OSPSuite.UI/Controls/UxHtmlLabel.cs | 46 +++++++++---------------- 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/src/OSPSuite.UI/Controls/UxHtmlLabel.cs b/src/OSPSuite.UI/Controls/UxHtmlLabel.cs index a0e447f02..58f37bbf2 100644 --- a/src/OSPSuite.UI/Controls/UxHtmlLabel.cs +++ b/src/OSPSuite.UI/Controls/UxHtmlLabel.cs @@ -1,51 +1,40 @@ using System; using System.Drawing; +using System.Windows.Forms; using DevExpress.Utils.Controls; using DevExpress.XtraEditors.Controls; using DevExpress.XtraRichEdit; +using AutoSizeMode = DevExpress.XtraRichEdit.AutoSizeMode; namespace OSPSuite.UI.Controls { public class UxHtmlLabel : UxRichEditControl, IXtraResizableControl { - private static readonly object _layoutInfoChanged = new object(); - private static string _fontFamily; - private static double _fontSize; + private readonly object _layoutInfoChanged = new object(); + public string FontFamily { get; set; } = UIConstants.DEFAULT_HTML_FONT; + public double FontSize { get; set; } = UIConstants.DEFAULT_HTML_FONT_SIZE; - public UxHtmlLabel(string fontFamily, double fontSize) + public UxHtmlLabel() { - _fontSize = fontSize; - _fontFamily = fontFamily; - AutoSizeMode = AutoSizeMode.Vertical; Options.VerticalScrollbar.Visibility = RichEditScrollbarVisibility.Hidden; ActiveView.BackColor = BackColor; BorderStyle = BorderStyles.NoBorder; PopupMenuShowing += (o, e) => e.Menu.Items.Clear(); Enabled = false; - Views.SimpleView.Padding = new System.Windows.Forms.Padding(0); + Views.SimpleView.Padding = new Padding(0); ActiveViewType = RichEditViewType.Simple; } - public UxHtmlLabel() : this(UIConstants.DEFAULT_HTML_FONT, UIConstants.DEFAULT_HTML_FONT_SIZE) - { - - } - event EventHandler IXtraResizableControl.Changed { - add - { - Events.AddHandler(_layoutInfoChanged, value); - } - remove - { - Events.RemoveHandler(_layoutInfoChanged, value); - } + add { Events.AddHandler(_layoutInfoChanged, value); } + remove { Events.RemoveHandler(_layoutInfoChanged, value); } } + protected void RaiseChanged() { - var changed = (EventHandler)Events[_layoutInfoChanged]; + var changed = (EventHandler) Events[_layoutInfoChanged]; changed?.Invoke(this, EventArgs.Empty); } @@ -61,24 +50,21 @@ protected override void OnSizeChanged(EventArgs e) RaiseChanged(); } - public void Caption(string caption, string fontFamily = "", double? fontSize = 8.25) + public void Caption(string caption) { - Document.HtmlText = stylizeHtmlText(fontFamily, fontSize) + $"
    {caption}
    "; + Document.HtmlText = $"{stylizeHtmlText}
    {caption}
    "; } - private static string stylizeHtmlText(string fontFamily, double? fontSize) - { - return $@" + private string stylizeHtmlText => $@" "; - } } } \ No newline at end of file From f84c1d21c6ad49527fedb2792251be6ad5ae32dc Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 11 May 2017 12:54:55 -0400 Subject: [PATCH 43/50] Defined caption as property set (#76) --- src/OSPSuite.Presentation/Services/ExceptionManager.cs | 2 +- src/OSPSuite.Presentation/Views/IExceptionView.cs | 2 +- src/OSPSuite.UI/Controls/UxHtmlLabel.cs | 4 ++-- src/OSPSuite.UI/Views/ExceptionView.cs | 9 ++------- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/OSPSuite.Presentation/Services/ExceptionManager.cs b/src/OSPSuite.Presentation/Services/ExceptionManager.cs index db58ef81f..53cff9d5d 100644 --- a/src/OSPSuite.Presentation/Services/ExceptionManager.cs +++ b/src/OSPSuite.Presentation/Services/ExceptionManager.cs @@ -21,7 +21,7 @@ public ExceptionManager(IDialogCreator dialogCreator, IExceptionView exceptionVi _dialogCreator = dialogCreator; _exceptionView = exceptionView; _productInfo = $"{configuration.ProductNameWithTrademark} {configuration.FullVersion}"; - _exceptionView.Initialize($"{_productInfo} - Error", configuration.Icon, _productInfo, configuration.IssueTrackerUrl, configuration.ProductName); + _exceptionView.Initialize($"{_productInfo} - Error", configuration.Icon, configuration.IssueTrackerUrl, configuration.ProductName); } public override void LogException(Exception ex) diff --git a/src/OSPSuite.Presentation/Views/IExceptionView.cs b/src/OSPSuite.Presentation/Views/IExceptionView.cs index a272f9d18..1928f2b3c 100644 --- a/src/OSPSuite.Presentation/Views/IExceptionView.cs +++ b/src/OSPSuite.Presentation/Views/IExceptionView.cs @@ -13,7 +13,7 @@ public interface IExceptionView /// /// Initialize the view with caption and icon. The assembly info contains information about the calling assembly /// - void Initialize(string caption, ApplicationIcon icon, string productInfo, string issueTrackerUrl, string productName); + void Initialize(string caption, ApplicationIcon icon, string issueTrackerUrl, string productName); /// /// set the text being displayed in the exception message field diff --git a/src/OSPSuite.UI/Controls/UxHtmlLabel.cs b/src/OSPSuite.UI/Controls/UxHtmlLabel.cs index 58f37bbf2..6f6907d94 100644 --- a/src/OSPSuite.UI/Controls/UxHtmlLabel.cs +++ b/src/OSPSuite.UI/Controls/UxHtmlLabel.cs @@ -50,9 +50,9 @@ protected override void OnSizeChanged(EventArgs e) RaiseChanged(); } - public void Caption(string caption) + public string Caption { - Document.HtmlText = $"{stylizeHtmlText}
    {caption}
    "; + set => Document.HtmlText = $"{stylizeHtmlText}
    {value}
    "; } private string stylizeHtmlText => $@" diff --git a/src/OSPSuite.UI/Views/ExceptionView.cs b/src/OSPSuite.UI/Views/ExceptionView.cs index d09ceb89d..744660469 100644 --- a/src/OSPSuite.UI/Views/ExceptionView.cs +++ b/src/OSPSuite.UI/Views/ExceptionView.cs @@ -1,21 +1,17 @@ using System; -using System.Drawing; using System.Threading; using System.Windows.Forms; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; using DevExpress.XtraLayout.Utils; -using DevExpress.XtraRichEdit; using OSPSuite.Assets; using OSPSuite.Presentation.Views; using OSPSuite.UI.Extensions; -using OSPSuite.Utility.Extensions; namespace OSPSuite.UI.Views { public partial class ExceptionView : XtraForm, IExceptionView { - private string _productInfo; private string _issueTrackerUrl; private string _cliboardContent; private const string _couldNotCopyToClipboard = "Unable to copy the information to the clipboard."; @@ -59,15 +55,14 @@ public string Description set { layoutItemDescription.Visibility = LayoutVisibilityConvertor.FromBoolean(!string.IsNullOrEmpty(value)); - htmlLabel.Caption(value); + htmlLabel.Caption = value; } } - public void Initialize(string caption, ApplicationIcon icon, string productInfo, string issueTrackerUrl, string productName) + public void Initialize(string caption, ApplicationIcon icon, string issueTrackerUrl, string productName) { Text = caption; Icon = icon; - _productInfo = productInfo; _issueTrackerUrl = issueTrackerUrl; Description = Captions.ExceptionViewDescription(issueTrackerUrl); issueTrackerLink.Text = Captions.IssueTrackerLinkFor(productName); From 09dce3cfe506b31fca9af585ddbd7fc07eaf66df Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 11 May 2017 13:00:17 -0400 Subject: [PATCH 44/50] Change syntax (#77) --- src/OSPSuite.UI/Controls/UxHtmlLabel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OSPSuite.UI/Controls/UxHtmlLabel.cs b/src/OSPSuite.UI/Controls/UxHtmlLabel.cs index 6f6907d94..4bb05b88d 100644 --- a/src/OSPSuite.UI/Controls/UxHtmlLabel.cs +++ b/src/OSPSuite.UI/Controls/UxHtmlLabel.cs @@ -52,7 +52,7 @@ protected override void OnSizeChanged(EventArgs e) public string Caption { - set => Document.HtmlText = $"{stylizeHtmlText}
    {value}
    "; + set { Document.HtmlText = $"{stylizeHtmlText}
    {value}
    "; } } private string stylizeHtmlText => $@" From 029dc1dd64cd6be8797ffeaa7e60c316cc80d281 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Tue, 23 May 2017 09:15:23 -0400 Subject: [PATCH 45/50] Fixes #82 RangeImage not visible anymore in Parameter Identification Result (#83) --- src/OSPSuite.UI/Services/OptimizedParameterRangeImageCreator.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/OSPSuite.UI/Services/OptimizedParameterRangeImageCreator.cs b/src/OSPSuite.UI/Services/OptimizedParameterRangeImageCreator.cs index 6e5d08042..fb58e92cd 100644 --- a/src/OSPSuite.UI/Services/OptimizedParameterRangeImageCreator.cs +++ b/src/OSPSuite.UI/Services/OptimizedParameterRangeImageCreator.cs @@ -36,6 +36,7 @@ public Image CreateFor(OptimizedParameterDTO optimizedParameterDTO) createPointSeries("seriesStart", MarkerKind.Square, startValue).LegendText = Captions.StartValue; _chart.XYDiagram.AxisY.Visibility = DefaultBoolean.False; + _chart.XYDiagram.AxisY.WholeRange.AutoSideMargins = false; _chart.XYDiagram.DefaultPane.BorderVisible = false; var image = new Bitmap(_chartSize.Width, _chartSize.Height); From 7a684615c087da7fa9ffd8e458632f82e91651e0 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Tue, 23 May 2017 09:47:20 -0400 Subject: [PATCH 46/50] Fixes #84 ReportTask should export to XLXS if required (#86) * Fixes #84 ReportTask should export to XLXS if required * Fixes #84 ReportTask should export to XLXS if required --- src/OSPSuite.Infrastructure/Services/ExportToExcelTask.cs | 4 ++-- src/OSPSuite.Infrastructure/Services/ReportTask.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/OSPSuite.Infrastructure/Services/ExportToExcelTask.cs b/src/OSPSuite.Infrastructure/Services/ExportToExcelTask.cs index 1ba1e2c58..608e24c0f 100644 --- a/src/OSPSuite.Infrastructure/Services/ExportToExcelTask.cs +++ b/src/OSPSuite.Infrastructure/Services/ExportToExcelTask.cs @@ -46,14 +46,14 @@ public static void ExportDataTablesToExcel(IEnumerable dataTables, st workbookConfiguration(workBook, dataTable); } - saveWorkbook(fileName, workBook); + SaveWorkbook(fileName, workBook); } if (openExcel) FileHelper.TryOpenFile(fileName); } - private static void saveWorkbook(string fileName, WorkBook workBook) + public static void SaveWorkbook(string fileName, WorkBook workBook) { FileHelper.TrySaveFile(fileName, () => { diff --git a/src/OSPSuite.Infrastructure/Services/ReportTask.cs b/src/OSPSuite.Infrastructure/Services/ReportTask.cs index 5afb670b7..9e2407286 100644 --- a/src/OSPSuite.Infrastructure/Services/ReportTask.cs +++ b/src/OSPSuite.Infrastructure/Services/ReportTask.cs @@ -29,7 +29,8 @@ public void CreateReport(IHistoryManager historyManager, ReportOptions reportOpt } workBook.setSheetName(SheetIndex.Report, reportOptions.SheetName); - workBook.write(reportOptions.ReportFullPath); + + ExportToExcelTask.SaveWorkbook(reportOptions.ReportFullPath, workBook); if (reportOptions.OpenReport) FileHelper.TryOpenFile(reportOptions.ReportFullPath); From 11e566c2a423695c24143c4ef52a536489d58543 Mon Sep 17 00:00:00 2001 From: Robert McIntosh Date: Tue, 23 May 2017 09:49:02 -0400 Subject: [PATCH 47/50] Fixes Open-Systems-Pharmacology/PK-Sim#182 - population plots are missing the context menu (#85) --- src/OSPSuite.UI/Controls/UxChartControl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OSPSuite.UI/Controls/UxChartControl.cs b/src/OSPSuite.UI/Controls/UxChartControl.cs index 64c99771b..39c2aa337 100644 --- a/src/OSPSuite.UI/Controls/UxChartControl.cs +++ b/src/OSPSuite.UI/Controls/UxChartControl.cs @@ -32,6 +32,7 @@ public UxChartControl(bool addDefaultPopup = true) _clipboardTask = new ClipboardTask(); _barManager = new BarManager {Form = this}; _popupMenu = new PopupMenu(_barManager); + _barManager.SetPopupContextMenu(this, _popupMenu); if (addDefaultPopup) initializePopup(); @@ -102,7 +103,6 @@ public virtual void CopyChartToClipboard(ChartControl chartControl) private void initializePopup() { - _barManager.SetPopupContextMenu(this, _popupMenu); AddPopupMenu(Captions.CopyAsImage, CopyToClipboard, ApplicationIcons.Paste); } From 8a2728156f4b83f4f87fbdbb1e9b91cd0c7ccac8 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 25 May 2017 11:06:07 -0400 Subject: [PATCH 48/50] Ensure that list of branches for build is specified in appveyor ci and not in appveyor.yml --- appveyor.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f4a63a41f..a5fbcab71 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,11 +35,6 @@ build: skip_branch_with_pr: true -branches: - only: - - master - - develop - test: assemblies: - OSPSuite.Core.Tests.dll From 6317e5ef0745b8cd96c25aadb26d108b69963ffc Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 25 May 2017 13:17:47 -0400 Subject: [PATCH 49/50] Fixes #92 popup menu not shown (#93) --- src/OSPSuite.UI/Controls/UxChartControl.cs | 23 ++++++++++++------- .../Views/Charts/ChartDisplayView.Designer.cs | 2 +- ...nalysisPKParameterAnalysisView.Designer.cs | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/OSPSuite.UI/Controls/UxChartControl.cs b/src/OSPSuite.UI/Controls/UxChartControl.cs index 39c2aa337..b7721c4ba 100644 --- a/src/OSPSuite.UI/Controls/UxChartControl.cs +++ b/src/OSPSuite.UI/Controls/UxChartControl.cs @@ -2,12 +2,12 @@ using System.Drawing; using System.Drawing.Imaging; using System.IO; -using OSPSuite.Utility.Extensions; using DevExpress.Utils; using DevExpress.XtraBars; using DevExpress.XtraCharts; using OSPSuite.Assets; using OSPSuite.UI.Services; +using OSPSuite.Utility.Extensions; namespace OSPSuite.UI.Controls { @@ -19,12 +19,12 @@ public class UxChartControl : ChartControl private readonly BarManager _barManager; private readonly PopupMenu _popupMenu; - public UxChartControl(bool addDefaultPopup = true) + public UxChartControl(bool useDefaultPopupMechanism = true, bool addCopyToClipboardMenu = true) { Titles.Clear(); _title = new ChartTitle {Text = string.Empty, Font = new Font("Arial", 16), Alignment = StringAlignment.Center, Dock = ChartTitleDockStyle.Top, WordWrap = true}; - _description = new ChartTitle { Text = string.Empty, Font = new Font("Arial", 12), Alignment = StringAlignment.Near, Dock = ChartTitleDockStyle.Bottom, WordWrap = true }; + _description = new ChartTitle {Text = string.Empty, Font = new Font("Arial", 12), Alignment = StringAlignment.Near, Dock = ChartTitleDockStyle.Bottom, WordWrap = true}; Titles.Add(_title); Titles.Add(_description); @@ -32,10 +32,9 @@ public UxChartControl(bool addDefaultPopup = true) _clipboardTask = new ClipboardTask(); _barManager = new BarManager {Form = this}; _popupMenu = new PopupMenu(_barManager); - _barManager.SetPopupContextMenu(this, _popupMenu); - if (addDefaultPopup) - initializePopup(); + if (useDefaultPopupMechanism) + initializePopup(addCopyToClipboardMenu); } /// @@ -101,9 +100,17 @@ public virtual void CopyChartToClipboard(ChartControl chartControl) } } - private void initializePopup() + private void initializePopup(bool addCopyToClipboardMenu) + { + _barManager.SetPopupContextMenu(this, _popupMenu); + + if (addCopyToClipboardMenu) + AddCopyToCliboardMenu(); + } + + public void AddCopyToCliboardMenu() { - AddPopupMenu(Captions.CopyAsImage, CopyToClipboard, ApplicationIcons.Paste); + AddPopupMenu(MenuNames.CopyToClipboard, CopyToClipboard, ApplicationIcons.Copy); } public DiagramCoordinates DiagramCoordinatesAt(HotTrackEventArgs e) diff --git a/src/OSPSuite.UI/Views/Charts/ChartDisplayView.Designer.cs b/src/OSPSuite.UI/Views/Charts/ChartDisplayView.Designer.cs index 4f69ac823..e8c6248e7 100644 --- a/src/OSPSuite.UI/Views/Charts/ChartDisplayView.Designer.cs +++ b/src/OSPSuite.UI/Views/Charts/ChartDisplayView.Designer.cs @@ -55,7 +55,7 @@ private void InitializeComponent() this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); this.barDockControlRight = new DevExpress.XtraBars.BarDockControl(); - this.chartControl = new UxChartControl(addDefaultPopup: false); + this.chartControl = new UxChartControl(useDefaultPopupMechanism: false); ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this._barManager)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.chartControl)).BeginInit(); diff --git a/src/OSPSuite.UI/Views/SensitivityAnalyses/SensitivityAnalysisPKParameterAnalysisView.Designer.cs b/src/OSPSuite.UI/Views/SensitivityAnalyses/SensitivityAnalysisPKParameterAnalysisView.Designer.cs index eca891955..1458ca4f9 100644 --- a/src/OSPSuite.UI/Views/SensitivityAnalyses/SensitivityAnalysisPKParameterAnalysisView.Designer.cs +++ b/src/OSPSuite.UI/Views/SensitivityAnalyses/SensitivityAnalysisPKParameterAnalysisView.Designer.cs @@ -37,7 +37,7 @@ private void InitializeComponent() DevExpress.XtraCharts.ChartTitle chartTitle4 = new DevExpress.XtraCharts.ChartTitle(); DevExpress.XtraCharts.ChartTitle chartTitle5 = new DevExpress.XtraCharts.ChartTitle(); DevExpress.XtraCharts.ChartTitle chartTitle6 = new DevExpress.XtraCharts.ChartTitle(); - this.chartControl = new UxChartControl(true); + this.chartControl = new UxChartControl(); this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); this.cbOutputPathSelection = new DevExpress.XtraEditors.ComboBoxEdit(); this.lblSensitivityNotCalculated = new DevExpress.XtraEditors.LabelControl(); From 116deb092f2041a5822652e205fb225114deb54b Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 25 May 2017 14:40:58 -0400 Subject: [PATCH 50/50] Branch filtering on appveyor.yml turned back on --- appveyor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index a5fbcab71..d3ee775c6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,6 +35,11 @@ build: skip_branch_with_pr: true +branches: + only: + - master + - develop + test: assemblies: - OSPSuite.Core.Tests.dll