Couple lines more coverage

This commit is contained in:
Antony Male 2014-05-08 17:44:04 +01:00
parent 1e76531e36
commit 55b23a61ed
2 changed files with 4 additions and 5 deletions

View File

@ -556,14 +556,12 @@ namespace StyletIoC
public override bool Equals(object obj)
{
if (!(obj is TypeKey))
return false;
return this.Equals((TypeKey)obj);
return this.Equals(obj as TypeKey);
}
public bool Equals(TypeKey other)
{
return this.Type == other.Type && this.Key == other.Key;
return other != null && this.Type == other.Type && this.Key == other.Key;
}
}

View File

@ -3,6 +3,7 @@ using StyletIoC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@ -71,7 +72,7 @@ namespace StyletUnitTests
public void AutobindingBindsConcreteTypes()
{
var builder = new StyletIoCBuilder();
builder.Autobind();
builder.Autobind(Enumerable.Empty<Assembly>());
var ioc = builder.BuildContainer();
var result = ioc.Get<C11>();