public void Runtime_AddInHasThreeRuntimesWithSecondOneMatchingAddInRuntime_ReturnsSecondAddInRuntime() { FakeAddIn fakeAddIn = CreateFakeAddIn("ICSharpCode.PackageManagement"); fakeAddIn.AddFakeAddInRuntime("Test.dll"); FakeAddInRuntime expectedRuntime = fakeAddIn.AddFakeAddInRuntime("PackageManagement.dll"); fakeAddIn.AddFakeAddInRuntime("AnotherTest.dll"); CreateRuntime(fakeAddIn); IAddInRuntime addInRuntime = runtime.Runtime; Assert.AreEqual(expectedRuntime, addInRuntime); }
public void Runtime_AddInHasMatchingAddInRuntime_ReturnsAddInRuntime() { FakeAddIn fakeAddIn = CreateFakeAddIn("ICSharpCode.PackageManagement"); FakeAddInRuntime expectedRuntime = fakeAddIn.AddFakeAddInRuntime("PackageManagement.dll"); CreateRuntime(fakeAddIn); IAddInRuntime addInRuntime = runtime.Runtime; Assert.AreEqual(expectedRuntime, addInRuntime); }
void AddFakeRuntime(FakeAddIn fakeAddIn, string runtimeFileName, Assembly assembly) { fakeAddIn.AddFakeAddInRuntime(runtimeFileName, assembly); }