The line corresponding to the assembly, used as a parameter below for Uri to work in XAML, but gives me the error shown when used in the code.
I tried all kinds of UriKind with the same result. How can i fix this?
[Test] public void LargeImageSource_IsKnown() { var uri = new Uri( "pack://application:,,,/" + "MyAssembly.Core.Presentation.Wpf;component/" + "Images/Delete.png", UriKind.RelativeOrAbsolute); Assert.That( _pickerActivityCollectionVm.DeleteActivityCommand.LargeImageSource, Is.EqualTo(uri)); } System.UriFormatException : Invalid URI: Invalid port specified. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at System.Uri..ctor(String uriString, UriKind uriKind)
UPDATE
Based on Thomas's excellent answer and my own comments regarding readability, I ended up using the following in my BaseTestFixture class. Hope this helps someone else.
protected virtual void OnFixtureSetUp() {
uri resources wpf xaml
Berryl May 14 '11 at 23:20 2011-05-14 23:20
source share