Example #1
0
        public void ItHasCorrectNameAndPriority()
        {
            var resolver = new DotNetMSBuildSdkResolver();

            Assert.Equal(5000, resolver.Priority);
            Assert.Equal("Microsoft.DotNet.MSBuildSdkResolver", resolver.Name);
        }
Example #2
0
        public void ItCallsNativeCodeWithoutCrashing() // WIP: placeholder to get plumbing through
        {
            var resolver = new DotNetMSBuildSdkResolver();
            var result   = (MockResult)resolver.Resolve(
                new SdkReference("Microsoft.NET.Sdk", null, null),
                new MockContext(),
                new MockFactory());

            _logger.WriteLine($"success: {result.Success}");
            _logger.WriteLine($"errors: {string.Join(Environment.NewLine, result.Errors ?? Array.Empty<string>())}");
            _logger.WriteLine($"warnings: {string.Join(Environment.NewLine, result.Warnings ?? Array.Empty<string>())}");
            _logger.WriteLine($"path: {result.Path}");
            _logger.WriteLine($"version: {result.Version}");
        }