Skip to content

Commit

Permalink
Updating .NET test dependency from FryProxy to BenderProxy
Browse files Browse the repository at this point in the history
The BenderProxy project is nothing more than a renamed and properly
packaged version of the FryProxy fork we were using previously.
Attempts to contact the owner of FryProxy through multiple channels
concerning incorporating the dependency removal changes we require,
so the fork has now been reversioned and published under another
name. The package has been published to NuGet, as Bazel does not
currently handle checked-in dependencies.
  • Loading branch information
jimevans committed May 3, 2019
1 parent e853da7 commit 8f1821d
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 8 deletions.
7 changes: 7 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ dotnet_nuget_new(
build_file = "//third_party/dotnet/nuget/packages:moq.bzl"
)

dotnet_nuget_new(
name = "benderproxy",
package = "benderproxy",
version = "1.0.0",
build_file = "//third_party/dotnet/nuget/packages:benderproxy.bzl"
)

dotnet_nuget_new(
name = "castle.core",
package = "castle.core",
Expand Down
8 changes: 4 additions & 4 deletions dotnet/test/common/ProxySettingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using System.Net.Sockets;
using System.Text;
using System.Threading;
using FryProxy;
using FryProxy.Writers;
using BenderProxy;
using BenderProxy.Writers;
using NUnit.Framework;
using OpenQA.Selenium.Environment;
using OpenQA.Selenium.IE;
Expand Down Expand Up @@ -338,7 +338,7 @@ public Proxy AsProxy()
return proxy;
}

private void OnServerLog(object sender, FryProxy.Logging.LogEventArgs e)
private void OnServerLog(object sender, BenderProxy.Logging.LogEventArgs e)
{
Console.WriteLine(e.LogMessage);
}
Expand Down Expand Up @@ -368,7 +368,7 @@ private void OverwriteRequestedContent(ProcessingContext context)

context.StopProcessing();
MemoryStream responseStream = new MemoryStream(Encoding.UTF8.GetBytes(pageContent));
var responseHeader = new FryProxy.Headers.HttpResponseHeader(200, "OK", "1.1");
var responseHeader = new BenderProxy.Headers.HttpResponseHeader(200, "OK", "1.1");
responseHeader.EntityHeaders.ContentType = "text/html";
responseHeader.EntityHeaders.ContentEncoding = "utf-8";
responseHeader.EntityHeaders.ContentLength = responseStream.Length;
Expand Down
4 changes: 2 additions & 2 deletions dotnet/test/common/WebDriver.Common.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FryProxy" Version="1.3.0" />
<PackageReference Include="BenderProxy" Version="1.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="Moq" Version="4.8.1" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
Expand Down
5 changes: 3 additions & 2 deletions third_party/dotnet/nuget/packages/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
exports_files([
"newtonsoft.json.bzl",
"benderproxy.bzl",
"castle.core.bzl",
"moq.bzl",
"newtonsoft.json.bzl",
"nunit.bzl",
"castle.core.bzl",
"system.threading.tasks.extensions.bzl"
])
Binary file not shown.
22 changes: 22 additions & 0 deletions third_party/dotnet/nuget/packages/benderproxy.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package(default_visibility = [ "//visibility:public" ])
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "net_import_library", "core_import_library")

net_import_library(
name = "net45",
src = "lib/net45/BenderProxy.dll",
)

net_import_library(
name = "net46",
src = "lib/net46/BenderProxy.dll",
)

net_import_library(
name = "net47",
src = "lib/net47/BenderProxy.dll",
)

core_import_library(
name = "netcore",
src = "lib/netstandard15/BenderProxy.dll"
)
Binary file not shown.

0 comments on commit 8f1821d

Please sign in to comment.