WebApplicationFactoryContentRootAttribute Sınıf

Tanım

WebApplicationFactory<TEntryPoint> tarafından TEntryPointtemsil edilen web uygulamasının içerik kökünü bulmak için kullanan meta veriler. WebApplicationFactory<TEntryPoint>, tüm örnekleri WebApplicationFactoryContentRootAttributeüzerinde yinelenir, eşittir TEntryPointFullNameolan örnekleri Key artan düzende sıralayarak Priority filtreleyin. WebApplicationFactory<TEntryPoint> içindeki işaretçinin Path.Combine(ContentRootPath, Path.GetFileName(ContentRootTest))" varlığını denetler ve dosya varsa içerik kökünü olarak ContentRootPathayarlar.

public ref class WebApplicationFactoryContentRootAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true, Inherited=false)]
public sealed class WebApplicationFactoryContentRootAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true, Inherited=false)>]
type WebApplicationFactoryContentRootAttribute = class
    inherit Attribute
Public NotInheritable Class WebApplicationFactoryContentRootAttribute
Inherits Attribute
Devralma
WebApplicationFactoryContentRootAttribute
Öznitelikler

Oluşturucular

WebApplicationFactoryContentRootAttribute(String, String, String, String)

yeni bir örneğini WebApplicationFactoryContentRootAttributebaşlatır.

Özellikler

ContentRootPath

Belirli bir projenin içerik kök yolunu alır. Bu içerik kökü göreli veya mutlak olabilir. Göreli bir yolsa, ile BaseDirectorybirleştirilir.

ContentRootTest

İçerik kök dizininin ayarlandığı yolun doğru olduğundan emin olmak için kullanılan bir işaretçi dosyası.

Key

Bu projeyle ilişkili içerik kökü anahtarını alır. Genellikle FullName.

Priority

Testte Assemblyaynı anahtara sahip birden çok WebApplicationFactoryContentRootAttribute örnek mevcut olduğunda yoklama sırasını belirlemek için bir sayı alır.

Şunlara uygulanır