private static void TestBadSDKReferenceIncludes(ITaskItem referenceInclude) { // Create the engine. MockEngine engine = new MockEngine(); ResolveSDKReference t = new ResolveSDKReference(); t.BuildEngine = engine; Assert.Null(t.ParseSDKReference(referenceInclude)); string errorMessage = t.Log.FormatResourceString("ResolveSDKReference.SDKReferenceIncorrectFormat", referenceInclude.ItemSpec); engine.AssertLogContains(errorMessage); }
private static void TestGoodSDKReferenceIncludes(ITaskItem referenceInclude, string simpleName, string version) { // Create the engine. MockEngine engine = new MockEngine(); ResolveSDKReference t = new ResolveSDKReference(); t.BuildEngine = engine; SDKReference reference = t.ParseSDKReference(referenceInclude); Assert.NotNull(reference); Assert.True(reference.SimpleName.Equals(simpleName, StringComparison.OrdinalIgnoreCase)); Assert.True(reference.Version.Equals(version, StringComparison.OrdinalIgnoreCase)); }