Skip to content

Commit

Permalink
fix: dara to darabonba
Browse files Browse the repository at this point in the history
  • Loading branch information
PanPanZou committed Jul 4, 2024
1 parent 8d99850 commit 4bce9ce
Show file tree
Hide file tree
Showing 82 changed files with 373 additions and 239 deletions.
Binary file removed Dara/.DS_Store
Binary file not shown.
21 changes: 0 additions & 21 deletions Dara/Exceptions/DaraUnretryableException.cs

This file was deleted.

40 changes: 0 additions & 40 deletions Dara/Utils/ListUtil.cs

This file was deleted.

Binary file removed DaraUnitTests/.DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions DaraUnitTests/DaraCoreTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Dara;
using Dara.RetryPolicy;
using Dara.Exceptions;
using Darabonba;
using Darabonba.RetryPolicy;
using Darabonba.Exceptions;
using Xunit;

namespace DaraUnitTests
Expand Down
3 changes: 1 addition & 2 deletions DaraUnitTests/DaraDateTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Globalization;
using Dara;
using Darabonba;
using Xunit;
using System;

Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/DaraFileTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Text;
using Dara;
using Darabonba;
using Xunit;
using System;
using System.IO;
Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/DaraModelTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Dara;
using Darabonba;
using DaraUnitTests.Models;

using Xunit;
Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/DaraRequestTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dara;
using Darabonba;

using Xunit;

Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/DaraResponseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Net.Http;
using System.Text;

using Dara;
using Darabonba;

using Xunit;

Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/DaraURLTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dara;
using Darabonba;
using Xunit;

namespace DaraUnitTests
Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/DaraUnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Dara\dara.csproj" />
<ProjectReference Include="..\Darabonba\Darabonba.csproj" />
</ItemGroup>

</Project>
3 changes: 1 addition & 2 deletions DaraUnitTests/DaraValidatorTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Dara;

using Darabonba;
using Xunit;

namespace DaraUnitTests
Expand Down
4 changes: 2 additions & 2 deletions DaraUnitTests/Exceptions/DaraRetryableExceptionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using System.Net;
using System.Net.Http;
using System.Text;
using Dara;
using Dara.Exceptions;
using Darabonba;
using Darabonba.Exceptions;
using Xunit;

namespace DaraUnitTests.Exceptions
Expand Down
22 changes: 0 additions & 22 deletions DaraUnitTests/Exceptions/DaraUnretryableExceptionTest.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using Tea;
using Dara.Utils;

using Darabonba.Utils;
using Xunit;

namespace DaraUnitTests
Expand Down
22 changes: 22 additions & 0 deletions DaraUnitTests/Exceptions/TeaUnretryableExceptionTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using Darabonba;
using Tea;
using Xunit;

namespace DaraUnitTests.Exceptions
{
public class TeaUnretryableExceptionTest
{
[Fact]
public void TestDaraUnretryableException()
{
TeaUnretryableException teaUnretryableExceptionEmpty = new TeaUnretryableException();
Assert.NotNull(teaUnretryableExceptionEmpty);

TeaUnretryableException teaUnretryableException = new TeaUnretryableException(new DaraRequest(), new Exception("Exception"));
Assert.NotNull(teaUnretryableException);
Assert.Equal(" Retry failed : Exception", teaUnretryableException.Message);
Assert.NotNull(teaUnretryableException.LastRequest);
}
}
}
2 changes: 1 addition & 1 deletion DaraUnitTests/Models/ListAllMyBucketsResult.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Collections.Generic;
using Dara;
using Darabonba;

namespace DaraUnitTests.Models
{
Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/Models/TestDicStringModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dara;
using Darabonba;

namespace DaraUnitTests.Models
{
Expand Down
3 changes: 1 addition & 2 deletions DaraUnitTests/Models/TestRegModel.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Collections;
using System.Collections.Generic;

using Dara;
using Darabonba;

namespace DaraUnitTests.Models
{
Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/Models/TestRegSubModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dara;
using Darabonba;

namespace DaraUnitTests.Models
{
Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/Models/ToBodyModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dara;
using Darabonba;

namespace DaraUnitTests.Models
{
Expand Down
4 changes: 2 additions & 2 deletions DaraUnitTests/RetryPolicy/BackoffPolicyTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using Dara.Exceptions;
using Dara.RetryPolicy;
using Darabonba.Exceptions;
using Darabonba.RetryPolicy;
using Xunit;

namespace DaraUnitTests.RetryPolicy
Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/Streams/FileFormStreamTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Threading.Tasks;

using Dara.Streams;
using Darabonba.Streams;
using Xunit;

namespace DaraUnitTests.Streams
Expand Down
4 changes: 2 additions & 2 deletions DaraUnitTests/Streams/StreamUtilTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using Dara.Streams;
using Dara.Models;
using Darabonba.Streams;
using Darabonba.Models;
using Xunit;
using System.Net;
using System.Net.Http;
Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/Utils/BytesUitlTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text;
using Xunit;
using Dara.Utils;
using Darabonba.Utils;

namespace DaraUnitTests.Utils
{
Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/Utils/ConverterUtilTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using Dara.Utils;
using Darabonba.Utils;
using DaraUnitTests.Models;
using Xunit;

Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/Utils/DictUtilsTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;

using Dara.Utils;
using Darabonba.Utils;

using Xunit;

Expand Down
4 changes: 3 additions & 1 deletion DaraUnitTests/Utils/ExtensionsTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Collections.Generic;
using Dara.Utils;
using Darabonba.Utils;
using Xunit;

namespace DaraUnitTests.Utils
Expand All @@ -10,7 +10,9 @@ public class ExtensionsTest
public void TestIsNull()
{
string str = null;
byte[] bytes = null;
Assert.True(str.IsNull());
Assert.True(bytes.IsNull());

string nonNullStr = "not null";
Assert.False(nonNullStr.IsNull());
Expand Down
14 changes: 8 additions & 6 deletions DaraUnitTests/Utils/FormUtilTest.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.IO;
using System.Text;
using Dara;
using Darabonba.Utils;
using Xunit;
using Dara.Streams;
using Darabonba.Streams;

namespace DaraUnitTests.Utils
{
Expand All @@ -15,10 +15,12 @@ public void Test_ToFormString()
Assert.Empty(FormUtil.ToFormString(null));
Assert.Empty(FormUtil.ToFormString(new Dictionary<string, object>()));

Dictionary<string, object> dict = new Dictionary<string, object>();
dict.Add("form", "test");
dict.Add("param", "test");
dict.Add("testNull", null);
Dictionary<string, object> dict = new Dictionary<string, object>
{
{ "form", "test" },
{ "param", "test" },
{ "testNull", null }
};
Assert.Equal("form=test&param=test", FormUtil.ToFormString(dict));
}

Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/Utils/HttpClientUtilsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using Dara.Utils;
using Darabonba.Utils;
using Xunit;

namespace DaraUnitTests.Utils
Expand Down
2 changes: 1 addition & 1 deletion DaraUnitTests/Utils/HttpUtilsTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Net.Http;

using Dara.Utils;
using Darabonba.Utils;

using Xunit;

Expand Down
Loading

0 comments on commit 4bce9ce

Please sign in to comment.