public void GivenTypeIsNotRegisteredWhenTryResolveCalledThenShouldReturnFalse() { IBar barInstance; var result = _target.TryResolve(out barInstance); Assert.IsNull(barInstance, "Test failed: bar instance should be null when type is not registered"); Assert.IsFalse(result, "Test failed: result should be false when type is not registered."); }
private Task ResolveSomething() { return(Task.Run(() => { IBar instance; var result = _target.TryResolve(out instance); })); }
private Task ResolveSomething() { return(Task.Run(() => { IBar instance; var result = _target.TryResolve(out instance); if (result) { Debug.WriteLine(Thread.CurrentThread.ManagedThreadId + " Shared: " + instance.UniqueIdentifier); } else { Debug.WriteLine(Thread.CurrentThread.ManagedThreadId + " Not available."); } })); }