Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ward <matt.ward@xamarin.com>2017-07-05 16:35:39 +0300
committerMatt Ward <matt.ward@xamarin.com>2017-07-05 16:35:39 +0300
commit47bf2396c2a0b564f02b6393da4379c44f1b39e8 (patch)
tree29c0c76598df588271486d4a3c6587e7058be219 /main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakeNuGetSettings.cs
parent3789c4f826874150d04af34d4fc20b51daa246d8 (diff)
[NuGet] Add extra information to project.assets.json
The generated project.assets.json file now includes the following if they exist: fallbackFolders configFilePaths sources warningProperties The above are added by .NET Core 2.0 into the project.assets.json file when dotnet restore is run. So now the NuGet addin does the same.
Diffstat (limited to 'main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakeNuGetSettings.cs')
-rw-r--r--main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakeNuGetSettings.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakeNuGetSettings.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakeNuGetSettings.cs
index 725ea709ef..b95f9535d1 100644
--- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakeNuGetSettings.cs
+++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakeNuGetSettings.cs
@@ -32,23 +32,13 @@ namespace MonoDevelop.PackageManagement.Tests.Helpers
{
class FakeNuGetSettings : ISettings
{
- public string FileName {
- get {
- throw new NotImplementedException ();
- }
- }
+ public string FileName { get; set; } = "NuGet.Config";
public IEnumerable<ISettings> Priority {
- get {
- throw new NotImplementedException ();
- }
+ get { yield return this; }
}
- public string Root {
- get {
- throw new NotImplementedException ();
- }
- }
+ public string Root { get; set; } = string.Empty;
public event EventHandler SettingsChanged;
@@ -69,12 +59,17 @@ namespace MonoDevelop.PackageManagement.Tests.Helpers
public IList<KeyValuePair<string, string>> GetNestedValues (string section, string subSection)
{
- throw new NotImplementedException ();
+ return new List<KeyValuePair<string, string>> ();
}
+ public Dictionary<string, List<SettingValue>> SettingValues = new Dictionary<string, List<SettingValue>> ();
+
public IList<SettingValue> GetSettingValues (string section, bool isPath = false)
{
- throw new NotImplementedException ();
+ List<SettingValue> settings = null;
+ if (SettingValues.TryGetValue (section, out settings))
+ return settings;
+ return new List<SettingValue> ();
}
public Dictionary<string, string> Values = new Dictionary<string, string> ();
@@ -97,6 +92,11 @@ namespace MonoDevelop.PackageManagement.Tests.Helpers
Values [GetKey (section, key)] = value;
}
+ public void SetValues (string section, List<SettingValue> values)
+ {
+ SettingValues [section] = values;
+ }
+
public void SetValues (string section, IReadOnlyList<SettingValue> values)
{
throw new NotImplementedException ();