U4-11546 [v7] Clean up to remove compiler warnings (#2823)

This commit is contained in:
Mundairson
2018-07-31 09:41:15 +01:00
committed by Sebastiaan Janssen
parent 3a0c872587
commit 9cd2db5018
26 changed files with 28 additions and 63 deletions

View File

@@ -1,6 +1,5 @@
using System;
using System.Linq;
using Umbraco.Core;
using Umbraco.Core.Models;
namespace Umbraco.Tests.CodeFirst
@@ -32,7 +31,7 @@ namespace Umbraco.Tests.CodeFirst
value = DateTime.Parse(property.Value.ToString());
else if (propertyInfo.PropertyType == typeof(Boolean))
{
if (String.IsNullOrEmpty(property.Value.ToString()) || property.Value == "0")
if (String.IsNullOrEmpty(property.Value.ToString()) || (string)property.Value == "0")
{
value = false;
}
@@ -48,4 +47,4 @@ namespace Umbraco.Tests.CodeFirst
return mapped;
}
}
}
}

View File

@@ -419,7 +419,6 @@ namespace Umbraco.Tests.CoreXml
{
var source = new TestSource5();
var nav = new NavigableNavigator(source);
TestContent content;
Assert.AreEqual(NavigableNavigator.StatePosition.Root, nav.InternalState.Position);
Assert.IsTrue(nav.MoveToFirstChild());
@@ -1162,4 +1161,4 @@ namespace Umbraco.Tests.CoreXml
}
#endregion
}
}

View File

@@ -26,7 +26,6 @@ namespace Umbraco.Tests
[Test]
public void Quits_On_Success_Count()
{
var maxTries = 5;
var totalTries = 0;
DelegateExtensions.RetryUntilSuccessOrMaxAttempts((currentTry) =>
{
@@ -43,4 +42,4 @@ namespace Umbraco.Tests
}
}
}

View File

@@ -12,7 +12,6 @@ namespace Umbraco.Tests.Models.Collections
public abstract class Item : IEntity, ICanBeDirty
{
private bool _hasIdentity;
private int? _hash;
private int _id;
private Guid _key;
@@ -173,15 +172,7 @@ namespace Umbraco.Tests.Models.Collections
public static bool operator ==(Item left, Item right)
{
/*if (ReferenceEquals(null, left))
return false;
if(ReferenceEquals(null, right))
return false;*/
return ReferenceEquals(left, right);
return left.Equals(right);
}
public static bool operator !=(Item left, Item right)
@@ -250,4 +241,4 @@ namespace Umbraco.Tests.Models.Collections
return this.MemberwiseClone();
}
}
}
}

View File

@@ -935,7 +935,6 @@ namespace Umbraco.Tests.PublishedContent
{
// the converter args
PublishedPropertyType argPropertyType = null;
object argSource = null;
bool argPreview = false;
var pt1 = new PublishedPropertyType("legend", 0, Constants.PropertyEditors.TextboxAlias);

View File

@@ -943,8 +943,6 @@ namespace Umbraco.Tests.Scheduling
throw new NotImplementedException();
}
private int i;
public async Task RunAsync(CancellationToken token)
{
Console.WriteLine("boom");