Skip to content

Commit

Permalink
Change namespace
Browse files Browse the repository at this point in the history
Models to .Models
Receivers to .Receivers
Extensions to .Polyfills
  • Loading branch information
wherewhere committed Oct 29, 2023
1 parent 9dad0ef commit 8fb4a3e
Show file tree
Hide file tree
Showing 131 changed files with 317 additions and 383 deletions.
4 changes: 1 addition & 3 deletions AdvancedSharpAdbClient.Tests/AdbClientTests.Async.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using AdvancedSharpAdbClient.Exceptions;
using AdvancedSharpAdbClient.Logs;
using System;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
Expand Down
4 changes: 1 addition & 3 deletions AdvancedSharpAdbClient.Tests/AdbClientTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using AdvancedSharpAdbClient.Exceptions;
using AdvancedSharpAdbClient.Logs;
using System;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Exceptions;
using System;
using System;
using Xunit;

namespace AdvancedSharpAdbClient.Tests
Expand Down
3 changes: 1 addition & 2 deletions AdvancedSharpAdbClient.Tests/AdbCommandLineClientTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Exceptions;
using System;
using System;
using Xunit;

namespace AdvancedSharpAdbClient.Tests
Expand Down
3 changes: 1 addition & 2 deletions AdvancedSharpAdbClient.Tests/AdbServerTests.Async.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Exceptions;
using NSubstitute;
using NSubstitute;
using NSubstitute.ExceptionExtensions;
using System;
using System.Net.Sockets;
Expand Down
3 changes: 1 addition & 2 deletions AdvancedSharpAdbClient.Tests/AdbServerTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Exceptions;
using NSubstitute;
using NSubstitute;
using System;
using System.Net;
using System.Net.Sockets;
Expand Down
3 changes: 1 addition & 2 deletions AdvancedSharpAdbClient.Tests/AdbSocketTests.Async.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Exceptions;
using System;
using System;
using System.IO;
using System.Text;
using System.Threading;
Expand Down
3 changes: 1 addition & 2 deletions AdvancedSharpAdbClient.Tests/AdbSocketTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Exceptions;
using System;
using System;
using System.IO;
using System.Text;
using Xunit;
Expand Down
50 changes: 1 addition & 49 deletions AdvancedSharpAdbClient.Tests/AdvancedSharpAdbClient.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,55 +24,7 @@
</ItemGroup>

<ItemGroup>
<None Update="Assets\dumpscreen.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\dumpscreen_clean.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\dumpscreen_error.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\dumpscreen_miui.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\dumpscreen_miui_clean.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\dumpsys_package.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\framebuffer.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\framebufferheader-empty.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\framebufferheader-v1.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\framebufferheader-v2.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\framebufferheader.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\fstab.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\gapps.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\logcat.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\logcatevents.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\test.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\testapp.apk">
<None Update="Assets\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Tests;
using NSubstitute;
using NSubstitute;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Tests;
using NSubstitute;
using NSubstitute;
using System.Collections.Generic;
using System.Linq;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System;
using Xunit;

namespace AdvancedSharpAdbClient.DeviceCommands.Tests
namespace AdvancedSharpAdbClient.Models.DeviceCommands.Tests
{
/// <summary>
/// Tests the <see cref="AndroidProcess"/> class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Xunit;

namespace AdvancedSharpAdbClient.DeviceCommands.Tests
namespace AdvancedSharpAdbClient.Models.DeviceCommands.Tests
{
/// <summary>
/// Tests the <see cref="VersionInfo"/> class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Tests;
using System.IO;
using System.IO;
using Xunit;

namespace AdvancedSharpAdbClient.DeviceCommands.Tests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Tests;
using NSubstitute;
using NSubstitute;
using System;
using System.IO;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Xunit;

namespace AdvancedSharpAdbClient.DeviceCommands.Tests
namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests
{
/// <summary>
/// Tests the <see cref="EnvironmentVariablesReceiver"/> class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using AdvancedSharpAdbClient.Tests;
using System.Collections.Generic;
using System.Collections.Generic;
using Xunit;

namespace AdvancedSharpAdbClient.DeviceCommands.Tests
namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests
{
public class GetPropReceiverTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Xunit;

namespace AdvancedSharpAdbClient.DeviceCommands.Tests
namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests
{
public class InstallOutputReceiverTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using AdvancedSharpAdbClient.Tests;
using Xunit;
using Xunit;

namespace AdvancedSharpAdbClient.DeviceCommands.Tests
namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests
{
public class PackageManagerReceiverTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Xunit;

namespace AdvancedSharpAdbClient.DeviceCommands.Tests
namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests
{
/// <summary>
/// Tests the <see cref="ProcessOutputReceiver"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.IO;
using Xunit;

namespace AdvancedSharpAdbClient.DeviceCommands.Tests
namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests
{
/// <summary>
/// Tests the <see cref="VersionInfoReceiver"/> class.
Expand All @@ -31,11 +31,11 @@ public void GetVersionTest()
Assert.Null(receiver.GetVersionCode(string.Empty));
Assert.Null(receiver.GetVersionCode(" versionCode=10210targetSdk=18"));

Assert.Equal("4.7.1", (string)receiver.GetVersionName(" versionName=4.7.1"));
Assert.Null((string)receiver.GetVersionName(null));
Assert.Null((string)receiver.GetVersionName(" test"));
Assert.Null((string)receiver.GetVersionName(" versionName"));
Assert.Equal(string.Empty, (string)receiver.GetVersionName(" versionName="));
Assert.Equal("4.7.1", receiver.GetVersionName(" versionName=4.7.1"));
Assert.Null(receiver.GetVersionName(null));
Assert.Null(receiver.GetVersionName(" test"));
Assert.Null(receiver.GetVersionName(" versionName"));
Assert.Equal(string.Empty, receiver.GetVersionName(" versionName="));

string dumpsys = string.Join(Environment.NewLine, File.ReadAllLines(@"Assets/dumpsys_package.txt"));
receiver = new VersionInfoReceiver();
Expand Down
3 changes: 1 addition & 2 deletions AdvancedSharpAdbClient.Tests/DeviceMonitorTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Logs;
using System;
using System;
using System.Linq;
using System.Threading;
using Xunit;
Expand Down
3 changes: 1 addition & 2 deletions AdvancedSharpAdbClient.Tests/Dummys/DummyAdbClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Logs;
using System;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
Expand Down
3 changes: 1 addition & 2 deletions AdvancedSharpAdbClient.Tests/Dummys/DummyAdbSocket.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Exceptions;
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Sockets;
Expand Down
3 changes: 1 addition & 2 deletions AdvancedSharpAdbClient.Tests/Dummys/TracingAdbSocket.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AdvancedSharpAdbClient.Exceptions;
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;
using Xunit;

namespace AdvancedSharpAdbClient.Tests
namespace AdvancedSharpAdbClient.Polyfills.Tests
{
/// <summary>
/// Tests the <see cref="DateTimeExtensions"/> class.
/// </summary>
public class DateTimeExtensionTests
public class DateTimeExtensionsTests
{
/// <summary>
/// Tests the <see cref="DateTimeExtensions.FromUnixTimeSeconds(long)"/> method.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Xunit;

namespace AdvancedSharpAdbClient.Polyfills.Tests
{
/// <summary>
/// Tests the <see cref="EnumerableExtensions"/> class.
/// </summary>
public class EnumerableExtensionsTests
{
/// <summary>
/// Tests the <see cref="EnumerableExtensions.AddRange{TSource}(ICollection{TSource}, IEnumerable{TSource})"/> method.
/// </summary>
[Fact]
public void AddRangeTest()
{
int[] numbs = [6, 7, 8, 9, 10];

List<int> list = [1, 2, 3, 4, 5];
list.AddRange(numbs);
Assert.Equal(10, list.Count);
Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], list);

HashSet<int> hashSet = [1, 2, 3, 4, 5];
hashSet.AddRange(numbs);
Assert.Equal(10, hashSet.Count);
Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], hashSet);

Collection<int> collection = [1, 2, 3, 4, 5];
collection.AddRange(numbs);
Assert.Equal(10, collection.Count);
Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], collection);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Xunit;

namespace AdvancedSharpAdbClient.Tests
namespace AdvancedSharpAdbClient.Polyfills.Tests
{
/// <summary>
/// Tests the <see cref="ExceptionExtensions"/> class.
Expand Down
25 changes: 0 additions & 25 deletions AdvancedSharpAdbClient.Tests/Extensions/ExtensionsTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using Xunit;
Expand All @@ -11,30 +10,6 @@ namespace AdvancedSharpAdbClient.Tests
/// </summary>
public class ExtensionsTests
{
/// <summary>
/// Tests the <see cref="Extensions.AddRange{TSource}(ICollection{TSource}, IEnumerable{TSource})"/> method.
/// </summary>
[Fact]
public void AddRangeTest()
{
int[] numbs = [6, 7, 8, 9, 10];

List<int> list = [1, 2, 3, 4, 5];
list.AddRange(numbs);
Assert.Equal(10, list.Count);
Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], list);

HashSet<int> hashSet = [1, 2, 3, 4, 5];
hashSet.AddRange(numbs);
Assert.Equal(10, hashSet.Count);
Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], hashSet);

Collection<int> collection = [1, 2, 3, 4, 5];
collection.AddRange(numbs);
Assert.Equal(10, collection.Count);
Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], collection);
}

[Fact]
public async void TaskToArrayTest()
{
Expand Down
2 changes: 1 addition & 1 deletion AdvancedSharpAdbClient.Tests/Models/AdbResponseTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Xunit;

namespace AdvancedSharpAdbClient.Tests
namespace AdvancedSharpAdbClient.Models.Tests
{
/// <summary>
/// Tests the <see cref="AdbResponse"/> class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Xunit;

namespace AdvancedSharpAdbClient.Tests
namespace AdvancedSharpAdbClient.Models.Tests
{
/// <summary>
/// Tests the <see cref="AdbServerStatus"/> class.
Expand Down
2 changes: 1 addition & 1 deletion AdvancedSharpAdbClient.Tests/Models/DeviceDataTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Xunit;

namespace AdvancedSharpAdbClient.Tests
namespace AdvancedSharpAdbClient.Models.Tests
{
/// <summary>
/// Tests the <see cref="DeviceData"/> class.
Expand Down
2 changes: 1 addition & 1 deletion AdvancedSharpAdbClient.Tests/Models/ForwardDataTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Xunit;

namespace AdvancedSharpAdbClient.Tests
namespace AdvancedSharpAdbClient.Models.Tests
{
/// <summary>
/// Tests the <see cref="ForwardData"/> class.
Expand Down
2 changes: 1 addition & 1 deletion AdvancedSharpAdbClient.Tests/Models/ForwardSpecTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Xunit;

namespace AdvancedSharpAdbClient.Tests
namespace AdvancedSharpAdbClient.Models.Tests
{
/// <summary>
/// Tests the <see cref="ForwardSpec"/> class.
Expand Down
Loading

0 comments on commit 8fb4a3e

Please sign in to comment.