Renamed te skyscraper8.Tests.NUnit project to skyscraper8.Tests
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 1m26s
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 1m26s
This commit is contained in:
parent
37a070b665
commit
b78520e2fe
@ -1,79 +0,0 @@
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
|
||||
namespace skyscraper8.Tests.NUnit;
|
||||
|
||||
[NonParallelizable]
|
||||
public class SkyscrapersTestingFramework
|
||||
{
|
||||
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
|
||||
private static Guid? _sessionId;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
if (_sessionId == null)
|
||||
{
|
||||
_sessionId = Guid.NewGuid();
|
||||
Console.WriteLine("New session: " + _sessionId);
|
||||
}
|
||||
Console.WriteLine("Setup");
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
Console.WriteLine("TearDown");
|
||||
|
||||
TestContext currentContext = TestContext.CurrentContext;
|
||||
}
|
||||
|
||||
public TException AssertTargetInvocation<TException>(TestDelegate action)
|
||||
where TException : Exception
|
||||
{
|
||||
TargetInvocationException exeption = Assert.Throws<TargetInvocationException>(action);
|
||||
|
||||
Assert.That(exeption.InnerException, Is.TypeOf<TException>());
|
||||
|
||||
return (TException)exeption.InnerException;
|
||||
}
|
||||
|
||||
private DirectoryInfo _samplesDirectory;
|
||||
private DirectoryInfo GetSamplesDirectory()
|
||||
{
|
||||
if (_samplesDirectory == null)
|
||||
{
|
||||
FileInfo fi = new FileInfo("sample_path.txt");
|
||||
if (!fi.Exists)
|
||||
{
|
||||
logger.WarnFormat("Could not find {0}", fi.FullName);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.InfoFormat("Reading samples path from: {0}", fi.FullName);
|
||||
string readAllText = File.ReadAllText(fi.FullName).Trim();
|
||||
_samplesDirectory = new DirectoryInfo(readAllText);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (_samplesDirectory == null)
|
||||
{
|
||||
Assert.Inconclusive("Could not find samples directory");
|
||||
}
|
||||
|
||||
return _samplesDirectory;
|
||||
}
|
||||
|
||||
protected FileStream GetStreamSample(string filename)
|
||||
{
|
||||
DirectoryInfo samplesDirectory = GetSamplesDirectory();
|
||||
FileInfo file = new FileInfo(Path.Combine(samplesDirectory.FullName, filename));
|
||||
if (!file.Exists)
|
||||
{
|
||||
Assert.Inconclusive(String.Format("Could not find sample file: {0}", file.FullName));
|
||||
}
|
||||
return file.OpenRead();
|
||||
}
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@ -1,10 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -12,46 +11,32 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
private static System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
private static System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("skyscraper8.Tests.NUnit.Properties.Resources", typeof(Resources).Assembly);
|
||||
if (object.Equals(null, resourceMan)) {
|
||||
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("skyscraper8.Tests.NUnit.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
@ -60,9 +45,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] Frame00000008_TSGS1_MIS000_SYNC001 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Frame00000008_TSGS1_MIS000_SYNC001", resourceCulture);
|
||||
@ -70,9 +52,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] Frame00000012_TSGS1_MIS000_SYNC001 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Frame00000012_TSGS1_MIS000_SYNC001", resourceCulture);
|
||||
@ -80,9 +59,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] Frame00000357_TSGS1_MIS000_SYNC184 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Frame00000357_TSGS1_MIS000_SYNC184", resourceCulture);
|
||||
@ -90,9 +66,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] Frame00001343_TSGS1_MIS000_SYNC001 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Frame00001343_TSGS1_MIS000_SYNC001", resourceCulture);
|
||||
@ -100,9 +73,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] ModemCapabilitiesEncodingTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ModemCapabilitiesEncodingTest", resourceCulture);
|
||||
@ -110,9 +80,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] PushMacManagementMessage_Version4_Type45 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PushMacManagementMessage_Version4_Type45", resourceCulture);
|
||||
@ -120,9 +87,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] ranging_response_test {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ranging_response_test", resourceCulture);
|
||||
@ -130,9 +94,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] sdpTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("sdpTest", resourceCulture);
|
||||
@ -140,9 +101,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] T45_V4_MultipartRegistrationResponseTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("T45_V4_MultipartRegistrationResponseTest", resourceCulture);
|
||||
@ -150,9 +108,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] T45_V4_MultipartRegistrationResponseTest2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("T45_V4_MultipartRegistrationResponseTest2", resourceCulture);
|
||||
@ -160,9 +115,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] test_1packet_01 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("test-1packet-01", resourceCulture);
|
||||
@ -170,9 +122,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] test_2packets_02_03 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("test-2packets-02-03", resourceCulture);
|
||||
@ -180,9 +129,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] test_3packets_04_05_06 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("test-3packets-04-05-06", resourceCulture);
|
||||
@ -190,9 +136,6 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] TransmitChannelConfigurationObject {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("TransmitChannelConfigurationObject", resourceCulture);
|
||||
@ -200,14 +143,18 @@ namespace skyscraper8.Tests.NUnit.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] UpstreamChannelDescriptorTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("UpstreamChannelDescriptorTest", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] ExampleVoileOnlinePost {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ExampleVoileOnlinePost", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -163,4 +163,7 @@
|
||||
<data name="UpstreamChannelDescriptorTest" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\UpstreamChannelDescriptorTest.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="ExampleVoileOnlinePost" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ExampleVoileOnlinePost.json;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
20
skyscraper8.Tests/Resources/ExampleVoileOnlinePost.json
Normal file
20
skyscraper8.Tests/Resources/ExampleVoileOnlinePost.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"SessionMetadata" : {
|
||||
"OS" : "Unix 6.8.0.124",
|
||||
"Guid" : "ad50ca18-0401-4f73-b2bc-60a3cf9437fb",
|
||||
"MachineName" : "meiko",
|
||||
"StartTime" : "2026-06-20T16:03:27.5038363+02:00",
|
||||
"ProductName" : "skyscraper8.Tests"
|
||||
},
|
||||
"TestResult" : {
|
||||
"ClassName" : "skyscraper8.Tests.NUnit.Tests.CoverageTests.DocsisCoverageTests",
|
||||
"MethodName" : "BurstDescriptorTests",
|
||||
"TimeTaken" : 116,
|
||||
"LogOutput" : "",
|
||||
"AssertionCount" : 28,
|
||||
"TestId" : 1051,
|
||||
"OutcomeLabel" : "",
|
||||
"OutcomeSite" : 0,
|
||||
"OutcomeStatus" : 2
|
||||
}
|
||||
}
|
||||
23
skyscraper8.Tests/SkyscraperTestException.cs
Normal file
23
skyscraper8.Tests/SkyscraperTestException.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System.Runtime.Serialization;
|
||||
using skyscraper5;
|
||||
|
||||
namespace skyscraper8.Tests.NUnit;
|
||||
|
||||
public class SkyscraperTestException : SkyscraperException
|
||||
{
|
||||
public SkyscraperTestException()
|
||||
{
|
||||
}
|
||||
|
||||
public SkyscraperTestException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public SkyscraperTestException(string message, Exception inner) : base(message, inner)
|
||||
{
|
||||
}
|
||||
|
||||
protected SkyscraperTestException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
201
skyscraper8.Tests/SkyscrapersTestingFramework.cs
Normal file
201
skyscraper8.Tests/SkyscrapersTestingFramework.cs
Normal file
@ -0,0 +1,201 @@
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using log4net.Repository.Hierarchy;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace skyscraper8.Tests.NUnit;
|
||||
|
||||
[NonParallelizable]
|
||||
public class SkyscrapersTestingFramework
|
||||
{
|
||||
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
|
||||
private Dictionary<string, DateTime> _testTimes;
|
||||
|
||||
private VoileOnlineTestSessionMetadata _voileOnlineTestSessionMetadata;
|
||||
|
||||
private VoileOnlineTestSessionMetadata GetVoileOnlineTestSessionMetadata()
|
||||
{
|
||||
if (_voileOnlineTestSessionMetadata == null)
|
||||
{
|
||||
_voileOnlineTestSessionMetadata = new VoileOnlineTestSessionMetadata();
|
||||
_voileOnlineTestSessionMetadata.Guid = Guid.NewGuid();
|
||||
_voileOnlineTestSessionMetadata.MachineName = Environment.MachineName;
|
||||
_voileOnlineTestSessionMetadata.StartTime = DateTime.Now;
|
||||
_voileOnlineTestSessionMetadata.OS = Environment.OSVersion.ToString();
|
||||
_voileOnlineTestSessionMetadata.ProductName = Assembly.GetExecutingAssembly().GetName().Name;
|
||||
}
|
||||
return _voileOnlineTestSessionMetadata;
|
||||
}
|
||||
|
||||
private HashSet<long> testIds;
|
||||
private long ResolveTestId()
|
||||
{
|
||||
string testId = TestContext.CurrentContext.Test.ID;
|
||||
if (testIds == null)
|
||||
testIds = new HashSet<long>();
|
||||
|
||||
long decodedTestId = 0;
|
||||
for (int i = 0; i < testId.Length; i++)
|
||||
{
|
||||
char current = testId[i];
|
||||
if (!char.IsDigit(current))
|
||||
continue;
|
||||
int currentDigit = current - '0';
|
||||
if (i != 0)
|
||||
decodedTestId *= 10;
|
||||
decodedTestId += currentDigit;
|
||||
}
|
||||
if (testIds.Contains(decodedTestId))
|
||||
throw new SkyscraperTestException("Test ID already used");
|
||||
testIds.Add(decodedTestId);
|
||||
return decodedTestId;
|
||||
}
|
||||
private long GetTestDuration()
|
||||
{
|
||||
if (_testTimes == null)
|
||||
return -1;
|
||||
|
||||
string key = TestContext.CurrentContext.Test.FullName;
|
||||
if (!_testTimes.ContainsKey(key))
|
||||
return -2;
|
||||
|
||||
return DateTime.Now.Subtract(_testTimes[key]).Milliseconds;
|
||||
}
|
||||
|
||||
private DirectoryInfo _samplesDirectory;
|
||||
private DirectoryInfo GetSamplesDirectory()
|
||||
{
|
||||
if (_samplesDirectory == null)
|
||||
{
|
||||
FileInfo fi = new FileInfo("sample_path.txt");
|
||||
if (!fi.Exists)
|
||||
{
|
||||
logger.WarnFormat("Could not find {0}", fi.FullName);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.InfoFormat("Reading samples path from: {0}", fi.FullName);
|
||||
string readAllText = File.ReadAllText(fi.FullName).Trim();
|
||||
_samplesDirectory = new DirectoryInfo(readAllText);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (_samplesDirectory == null)
|
||||
{
|
||||
Assert.Inconclusive("Could not find samples directory");
|
||||
}
|
||||
|
||||
return _samplesDirectory;
|
||||
}
|
||||
|
||||
protected FileStream GetStreamSample(string filename)
|
||||
{
|
||||
DirectoryInfo samplesDirectory = GetSamplesDirectory();
|
||||
FileInfo file = new FileInfo(Path.Combine(samplesDirectory.FullName, filename));
|
||||
if (!file.Exists)
|
||||
{
|
||||
Assert.Inconclusive(String.Format("Could not find sample file: {0}", file.FullName));
|
||||
}
|
||||
return file.OpenRead();
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
Console.WriteLine("Setup");
|
||||
if (_testTimes == null)
|
||||
_testTimes = new Dictionary<string, DateTime>();
|
||||
|
||||
SetUpLogCapture();
|
||||
|
||||
string key = TestContext.CurrentContext.Test.FullName;
|
||||
DateTime value = DateTime.Now;
|
||||
_testTimes[key] = value;
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
Console.WriteLine("TearDown");
|
||||
|
||||
TestContext currentContext = TestContext.CurrentContext;
|
||||
|
||||
VoileOnlineTestResult voileOnlineTestResult = new VoileOnlineTestResult();
|
||||
voileOnlineTestResult.ClassName = currentContext.Test.ClassName;
|
||||
voileOnlineTestResult.MethodName = currentContext.Test.MethodName;
|
||||
voileOnlineTestResult.OutcomeLabel = currentContext.Result.Outcome.Label;
|
||||
voileOnlineTestResult.OutcomeSite = (int)currentContext.Result.Outcome.Site;
|
||||
voileOnlineTestResult.OutcomeStatus = (int)currentContext.Result.Outcome.Status;
|
||||
voileOnlineTestResult.TimeTaken = GetTestDuration();
|
||||
voileOnlineTestResult.LogOutput = TearDownLogCapture();
|
||||
voileOnlineTestResult.AssertionCount = currentContext.AssertCount;
|
||||
voileOnlineTestResult.TestId = ResolveTestId();
|
||||
|
||||
|
||||
|
||||
|
||||
VoileOnlineTestPost voileOnlinePost = new VoileOnlineTestPost();
|
||||
voileOnlinePost.SessionMetadata = GetVoileOnlineTestSessionMetadata();
|
||||
voileOnlinePost.TestResult = voileOnlineTestResult;
|
||||
VoileOnlineUploader.Upload(voileOnlinePost);
|
||||
}
|
||||
|
||||
public TException AssertTargetInvocation<TException>(TestDelegate action)
|
||||
where TException : Exception
|
||||
{
|
||||
TargetInvocationException exeption = Assert.Throws<TargetInvocationException>(action);
|
||||
|
||||
Assert.That(exeption.InnerException, Is.TypeOf<TException>());
|
||||
|
||||
return (TException)exeption.InnerException;
|
||||
}
|
||||
|
||||
private TestLog4NetAppender? _testLogAppender;
|
||||
|
||||
protected TestLog4NetAppender TestLogAppender =>
|
||||
_testLogAppender ?? throw new InvalidOperationException("Test log appender is not initialized.");
|
||||
|
||||
private void SetUpLogCapture()
|
||||
{
|
||||
Hierarchy hierarchy = (Hierarchy)LogManager.GetRepository();
|
||||
|
||||
_testLogAppender = new TestLog4NetAppender
|
||||
{
|
||||
Name = $"TestLogAppender-{TestContext.CurrentContext.Test.ID}"
|
||||
};
|
||||
|
||||
_testLogAppender.ActivateOptions();
|
||||
|
||||
hierarchy.Root.AddAppender(_testLogAppender);
|
||||
|
||||
if (hierarchy.Root.Level == null)
|
||||
{
|
||||
hierarchy.Root.Level = log4net.Core.Level.Debug;
|
||||
}
|
||||
|
||||
hierarchy.Configured = true;
|
||||
}
|
||||
|
||||
private string TearDownLogCapture()
|
||||
{
|
||||
string logText = _testLogAppender?.GetText() ?? string.Empty;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(logText))
|
||||
{
|
||||
TestContext.WriteLine("Captured log4net output:");
|
||||
TestContext.WriteLine(logText);
|
||||
}
|
||||
|
||||
if (_testLogAppender is not null)
|
||||
{
|
||||
Hierarchy hierarchy = (Hierarchy)LogManager.GetRepository();
|
||||
hierarchy.Root.RemoveAppender(_testLogAppender);
|
||||
_testLogAppender.Close();
|
||||
_testLogAppender = null;
|
||||
}
|
||||
|
||||
return logText;
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,8 @@ public class TestLog4NetAppender : AppenderSkeleton
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_events == null)
|
||||
return new List<LoggingEvent>();
|
||||
return _events.AsReadOnly();
|
||||
}
|
||||
}
|
||||
21
skyscraper8.Tests/Tests/ResourceTests/TestingTests.cs
Normal file
21
skyscraper8.Tests/Tests/ResourceTests/TestingTests.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace skyscraper8.Tests.NUnit.Tests.ResourceTests;
|
||||
|
||||
[TestFixture]
|
||||
public class TestingTests
|
||||
{
|
||||
[Test]
|
||||
public void ReadVoileOnlineTest()
|
||||
{
|
||||
byte[] buffer = Properties.Resources.ExampleVoileOnlinePost;
|
||||
VoileOnlineTestPost? voileOnlineTestPost = JsonConvert.DeserializeObject<VoileOnlineTestPost>(Encoding.UTF8.GetString(buffer));
|
||||
Assert.IsNotNull(voileOnlineTestPost);
|
||||
Assert.IsNotNull(voileOnlineTestPost.SessionMetadata);
|
||||
Assert.IsNotNull(voileOnlineTestPost.TestResult);
|
||||
Assert.AreEqual(2, voileOnlineTestPost.TestResult.OutcomeStatus);
|
||||
Assert.AreEqual("meiko",voileOnlineTestPost.SessionMetadata.MachineName);
|
||||
|
||||
}
|
||||
}
|
||||
7
skyscraper8.Tests/VoileOnlineTestPost.cs
Normal file
7
skyscraper8.Tests/VoileOnlineTestPost.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace skyscraper8.Tests.NUnit;
|
||||
|
||||
public class VoileOnlineTestPost
|
||||
{
|
||||
public VoileOnlineTestSessionMetadata SessionMetadata { get; set; }
|
||||
public VoileOnlineTestResult TestResult { get; set; }
|
||||
}
|
||||
16
skyscraper8.Tests/VoileOnlineTestResult.cs
Normal file
16
skyscraper8.Tests/VoileOnlineTestResult.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using NUnit.Framework.Interfaces;
|
||||
|
||||
namespace skyscraper8.Tests.NUnit;
|
||||
|
||||
public class VoileOnlineTestResult
|
||||
{
|
||||
public string? ClassName { get; set; }
|
||||
public string? MethodName { get; set; }
|
||||
public long TimeTaken { get; set; }
|
||||
public string LogOutput { get; set; }
|
||||
public int AssertionCount { get; set; }
|
||||
public long TestId { get; set; }
|
||||
public string OutcomeLabel { get; set; }
|
||||
public int OutcomeSite { get; set; }
|
||||
public int OutcomeStatus { get; set; }
|
||||
}
|
||||
10
skyscraper8.Tests/VoileOnlineTestSessionMetadata.cs
Normal file
10
skyscraper8.Tests/VoileOnlineTestSessionMetadata.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace skyscraper8.Tests.NUnit;
|
||||
|
||||
public class VoileOnlineTestSessionMetadata
|
||||
{
|
||||
public string OS { get; set; }
|
||||
public Guid Guid { get; set; }
|
||||
public string MachineName { get; set; }
|
||||
public DateTime StartTime { get; set; }
|
||||
public string? ProductName { get; set; }
|
||||
}
|
||||
84
skyscraper8.Tests/VoileOnlineUploader.cs
Normal file
84
skyscraper8.Tests/VoileOnlineUploader.cs
Normal file
@ -0,0 +1,84 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace skyscraper8.Tests.NUnit;
|
||||
|
||||
public sealed class VoileOnlineUploader
|
||||
{
|
||||
public static void Upload(VoileOnlineTestPost voileOnlinePost)
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new VoileOnlineUploader();
|
||||
}
|
||||
|
||||
_instance.PushResult(voileOnlinePost);
|
||||
}
|
||||
|
||||
private static VoileOnlineUploader _instance;
|
||||
private Thread _uploaderThread;
|
||||
private Queue<VoileOnlineTestPost> _queue;
|
||||
|
||||
private void PushResult(VoileOnlineTestPost voileOnlinePost)
|
||||
{
|
||||
if (_queue == null)
|
||||
_queue = new Queue<VoileOnlineTestPost>();
|
||||
|
||||
lock (_queue)
|
||||
{
|
||||
_queue.Enqueue(voileOnlinePost);
|
||||
}
|
||||
|
||||
if (_uploaderThread == null)
|
||||
{
|
||||
_uploaderThread = new Thread(PusherThread);
|
||||
_uploaderThread.Priority = ThreadPriority.Lowest;
|
||||
_uploaderThread.Name = "VoileOnlineUploader";
|
||||
}
|
||||
|
||||
switch (_uploaderThread.ThreadState)
|
||||
{
|
||||
case ThreadState.Unstarted:
|
||||
_uploaderThread.Start();
|
||||
break;
|
||||
case ThreadState.Running:
|
||||
break;
|
||||
case ThreadState.Stopped:
|
||||
_uploaderThread = new Thread(PusherThread);
|
||||
_uploaderThread.Priority = ThreadPriority.Lowest;
|
||||
_uploaderThread.Name = "VoileOnlineUploader";
|
||||
_uploaderThread.Start();
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException(String.Format("ThreadState: {0}", _uploaderThread.ThreadState));
|
||||
}
|
||||
}
|
||||
|
||||
private void PusherThread()
|
||||
{
|
||||
int numElements = 0;
|
||||
lock (_queue)
|
||||
{
|
||||
numElements = _queue.Count;
|
||||
}
|
||||
while (numElements > 0)
|
||||
{
|
||||
VoileOnlineTestPost voileOnlinePost;
|
||||
lock (_queue)
|
||||
{
|
||||
voileOnlinePost = _queue.Dequeue();
|
||||
}
|
||||
|
||||
string json = JsonConvert.SerializeObject(voileOnlinePost);
|
||||
DoPost(json);
|
||||
|
||||
lock (_queue)
|
||||
{
|
||||
numElements = _queue.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DoPost(string json)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,7 @@
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<RootNamespace>skyscraper8.Tests.NUnit</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -65,7 +65,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper8.UI.MonoGame", "
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper8.UI.MonoGame.Bridge", "GUIs\skyscraper8.UI.ImGui.MonoGame.Bridge\skyscraper8.UI.MonoGame.Bridge.csproj", "{1A29F6E6-4B6A-DCCD-1DF1-AA8D020E17D2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper8.Tests.NUnit", "skyscraper8.Tests.NUnit\skyscraper8.Tests.NUnit.csproj", "{5FB2AA76-580E-4343-B155-5D596DDC27F2}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper8.Tests", "skyscraper8.Tests\skyscraper8.Tests.csproj", "{5FB2AA76-580E-4343-B155-5D596DDC27F2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F053cba69424c47858472194d509c3cdc12bb0_003F37_003F58cc70f4_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa840692e98b74557bc005b38213a22c72dad0_003Fc8_003F58c2e0c9_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F62bb4746d7d14dc1cd4274a28788572a7a4641bd3a7d5736479c9697bcb4794_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2026_002E1_003Fresharper_002Dhost_003FSourcesCache_003F46a322d26154b982566e1817203e5452c91223f93b0e392d9c5b4806696fdc1_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002EInconclusive_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F8e305e26401afcd395b5be2da0e23d61432655dc5f2c2e5e6d5bd873bb0cb90_003FAssert_002EInconclusive_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002EThrowsException_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fe6930caf46f7fcaa445fdd26a3884170a45a4766298259e7a29bae560adef_003FAssert_002EThrowsException_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABeforeAndAfterTestCommand_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2026_002E1_003Fresharper_002Dhost_003FSourcesCache_003Ff536671e825030c7f17fbf3f75511651c281f2429edc8fd6ea660418f825949_003FBeforeAndAfterTestCommand_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
@ -15,10 +16,13 @@
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFastResourceComparer_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F8f_003Ffb4ed86c_003FFastResourceComparer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFileInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F5a_003Fcf76af61_003FFileInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AInterop_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fea_003F7d70064b_003FInterop_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJsonSerializerInternalReader_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2026_002E1_003Fresharper_002Dhost_003FSourcesCache_003F52f3815551fa6e6d408ea7dbf6748f7efe35caea15eb53ee27ee1bb406d62c8_003FJsonSerializerInternalReader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F6b_003Fa410ee2c_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AManifestBasedResourceGroveler_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2026_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F1f03371654aa41ca984353e7e344e822b2e200_003F06_003F506a7cf8_003FManifestBasedResourceGroveler_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMemberInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fce_003F751a2c1f_003FMemberInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMemoryStream_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0d_003F068af3a6_003FMemoryStream_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMethodBaseInvoker_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F7a_003F86728bdc_003FMethodBaseInvoker_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMethodBaseInvoker_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2026_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F1f03371654aa41ca984353e7e344e822b2e200_003Fc3_003F355fe836_003FMethodBaseInvoker_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANotImplementedException_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fa3_003F2c4f9089_003FNotImplementedException_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullable_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0d_003F6549c49b_003FNullable_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullAsserts_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F3f4719f7ce375226774d6991a6afc2f6932e58b42fd58ff13c7c03771642e_003FNullAsserts_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
@ -36,25 +40,20 @@
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASR_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F4d_003F7edc51d9_003FSR_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AString_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F2e_003F1a14f40f_003FString_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATestMethodInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F9ea467e7c7b4671a214143293021e7ec337916b71125d896e17a0b7fc_003FTestMethodInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThread_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2026_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F1f03371654aa41ca984353e7e344e822b2e200_003F9e_003F4a40121f_003FThread_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Feb_003F3c476997_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F4f_003F7bfc5050_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffb63d7b4f026464dbf9b2db60c7f76bc2ac00_003Fbd_003F4080deac_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATuple_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F9f_003F0d16f921_003FTuple_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AXmlSerializer_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2026_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F7d5324401ccb48a5b32c2bfdf42662547b5800_003Fb2_003F4570db6a_003FXmlSerializer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/dotCover/Editor/HighlightingSourceSnapshotLocation/@EntryValue">/home/schiemas/.cache/JetBrains/Rider2026.1/resharper-host/temp/Rider/vAny/CoverageData/_skyscraper8.1808907683/Snapshot/snapshot.utdcvr</s:String>
|
||||
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue"><AssemblyExplorer>
|
||||
<Assembly Path="/home/schiemas/.dotnet/packs/Microsoft.NETCore.App.Ref/8.0.21/ref/net8.0/System.Windows.dll" />
|
||||
<Assembly Path="/home/schiemas/.nuget/packages/allure.net.commons/2.14.1/lib/netstandard2.0/Allure.Net.Commons.dll" />
|
||||
</AssemblyExplorer></s:String>
|
||||
<s:String x:Key="/Default/Environment/Highlighting/HighlightingSourceSnapshotLocation/@EntryValue">/home/schiemas/.cache/JetBrains/Rider2025.1/resharper-host/temp/Rider/vAny/CoverageData/_skyscraper8.1808907683/Snapshot/snapshot.utdcvr</s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=145b05c0_002D83b0_002D4386_002Db9fb_002De55ec3152557/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" Name="All tests from &lt;skyscraper8.Tests&gt;" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<And>
|
||||
<Namespace>skyscraper8.Tests</Namespace>
|
||||
<Project Location="\home\schiemas\RiderProjects\skyscraper8\skyscraper8.Tests" Presentation="&lt;skyscraper8.Tests&gt;" />
|
||||
</And>
|
||||
</SessionState></s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=58c56b00_002Df81e_002D48fd_002Da74f_002Dc8e84271fcf4/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" Name="Continuous Testing" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<Project Location="\home\schiemas\RiderProjects\skyscraper8\skyscraper8.Tests" Presentation="&lt;skyscraper8.Tests&gt;" />
|
||||
</SessionState></s:String>
|
||||
|
||||
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=ce70f33b_002D9024_002D4750_002Da24e_002D78f4e8e5e879/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from &lt;skyscraper8.Tests&gt;" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<Solution />
|
||||
</SessionState></s:String>
|
||||
@ -65,7 +64,9 @@
|
||||
|
||||
|
||||
<s:String x:Key="/Default/Profiling/Configurations/=1/@EntryIndexedValue"><data><HostParameters type="LocalHostParameters" /><Argument type="StandaloneArgument"><Arguments IsNull="False"></Arguments><FileName IsNull="False"></FileName><WorkingDirectory IsNull="False"></WorkingDirectory><Scope><ProcessFilters /></Scope></Argument><Info type="TimelineInfo" /><CoreOptions type="CoreOptions"><CoreTempPath IsNull="False"></CoreTempPath><RemoteEndPoint IsNull="False"></RemoteEndPoint><AdditionalEnvironmentVariables /></CoreOptions><HostOptions type="HostOptions"><HostTempPath IsNull="False"></HostTempPath></HostOptions></data></s:String>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=skyscraper8_002ETests_002FProperties_002FResources/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=skyscraper8_002ETests_002ENUnit_002FProperties_002FResources/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=skyscraper8_002ETests_002ENUnit_002FProperties_002FResources/@EntryIndexRemoved">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=skyscraper8_002ETests_002FProperties_002FResources/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=skyscraper8_002ETests_002FResources1/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/Initialized/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/ShowOnlyErrors/@EntryValue">False</s:Boolean>
|
||||
|
||||
@ -11,6 +11,7 @@ public class TarArchive : IDisposable, IAsyncDisposable
|
||||
|
||||
backend = stream;
|
||||
byte[] headerBuffer = null;
|
||||
entries = new List<TarArchiveEntry>();
|
||||
while (stream.Position < stream.Length)
|
||||
{
|
||||
if (headerBuffer == null)
|
||||
@ -26,8 +27,6 @@ public class TarArchive : IDisposable, IAsyncDisposable
|
||||
|
||||
stream.Position += header.GetSizeOnTape();
|
||||
|
||||
if (entries == null)
|
||||
entries = new List<TarArchiveEntry>();
|
||||
entries.Add(entry);
|
||||
}
|
||||
}
|
||||
@ -117,8 +116,6 @@ public class TarArchive : IDisposable, IAsyncDisposable
|
||||
|
||||
public bool HasEntry(string filename)
|
||||
{
|
||||
if (entries == null)
|
||||
return false;
|
||||
if (entries.Count == 0)
|
||||
return false;
|
||||
|
||||
@ -133,8 +130,6 @@ public class TarArchive : IDisposable, IAsyncDisposable
|
||||
|
||||
public byte[] ReadEntry(string filename)
|
||||
{
|
||||
if (entries == null)
|
||||
return null;
|
||||
if (entries.Count == 0)
|
||||
return null;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user