public void NamedTypeTestInterfaceNoEventsNoFieldsSomeMethodsNoNamedTypesStringRep() { var namedTypeSymbol = (INamedTypeSymbol)TestResource.GetTestMember("TestLibrary.PublicInterface`1"); NamedTypeApiView publicInterface = new NamedTypeApiView(namedTypeSymbol); Assert.Contains("public interface PublicInterface<T> {", publicInterface.ToString()); }
public void NamedTypeTestDelegateStringRep() { var namedTypeSymbol = (INamedTypeSymbol)TestResource.GetTestMember("TestLibrary.publicDelegate"); NamedTypeApiView publicDelegate = new NamedTypeApiView(namedTypeSymbol); Assert.Equal("public delegate int publicDelegate(int num = 10) { }", publicDelegate.ToString().Replace(Environment.NewLine, "")); }
public void NamedTypeTestEnumDefaultUnderlyingTypeStringRep() { var namedTypeSymbol = (INamedTypeSymbol)TestResource.GetTestMember("TestLibrary.PublicClass", "PublicEnum"); NamedTypeApiView publicEnum = new NamedTypeApiView(namedTypeSymbol); string stringRep = publicEnum.ToString().Replace(Environment.NewLine, ""); Assert.Equal("public enum PublicEnum { One = 0, Two = 1, Three = 2,}", stringRep); }
public void NamedTypeTestImplementsInterfaceStringRep() { var namedTypeSymbol = (INamedTypeSymbol)TestResource.GetTestMember("TestLibrary.ImplementingClass"); NamedTypeApiView implementer = new NamedTypeApiView(namedTypeSymbol); Assert.Contains("public class ImplementingClass : TestLibrary.PublicInterface<int> {", implementer.ToString()); }
public void NamedTypeTestClassSomeEventsSomeFieldsNoMethodsSomeNamedTypesStringRep() { var namedTypeSymbol = (INamedTypeSymbol)TestResource.GetTestMember("TestLibrary.SomeEventsSomeFieldsNoMethodsSomeNamedTypes"); NamedTypeApiView publicClass = new NamedTypeApiView(namedTypeSymbol); Assert.Contains("public class SomeEventsSomeFieldsNoMethodsSomeNamedTypes {", publicClass.ToString()); }