-
-
Notifications
You must be signed in to change notification settings - Fork 454
Expand file tree
/
Copy pathNamespaceScrapingTests.cs
More file actions
28 lines (23 loc) · 815 Bytes
/
NamespaceScrapingTests.cs
File metadata and controls
28 lines (23 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Xml;
using Silk.NET.SilkTouch.Symbols;
using Xunit;
namespace Silk.NET.SilkTouch.Scraper.Tests;
public class NamespaceScrapingTests
{
[Fact]
public void NamespaceXMLGeneratesNamespaceSymbol()
{
var doc = new XmlDocument();
doc.LoadXml(@"<bindings>
<namespace name=""" + ClangScraper.LibraryNamespacePlaceholder + @""">
</namespace>
</bindings>
");
var symbols = new ClangScraper().ScrapeXML(doc);
var symbol = Assert.Single(symbols);
var @namespace = Assert.IsType<NamespaceSymbol>(symbol);
Assert.Equal(ClangScraper.LibraryNamespacePlaceholder, @namespace.Identifier.Value);
}
}