-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ee8200
commit 106a7c7
Showing
123 changed files
with
4,039 additions
and
387 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
Src/Recombee.ApiClient.Tests/AddManualReqlSegmentBatchUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Xunit; | ||
using Recombee.ApiClient.ApiRequests; | ||
using Recombee.ApiClient.Bindings; | ||
|
||
namespace Recombee.ApiClient.Tests | ||
{ | ||
public class AddManualReqlSegmentBatchUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestAddManualReqlSegment() | ||
{ | ||
Object resp2; | ||
resp2 = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); | ||
|
||
Request[] requests = new Request[] { | ||
new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment") | ||
}; | ||
|
||
BatchResponse batchResponse = client.Send(new Batch(requests)); | ||
Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
} | ||
|
||
[Fact] | ||
public async void TestAddManualReqlSegmentAsync() | ||
{ | ||
Object resp2; | ||
resp2 = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); | ||
|
||
Request[] requests = new Request[] { | ||
new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment") | ||
}; | ||
|
||
BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); | ||
Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
Src/Recombee.ApiClient.Tests/AddManualReqlSegmentUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Xunit; | ||
using Recombee.ApiClient.ApiRequests; | ||
using Recombee.ApiClient.Bindings; | ||
|
||
namespace Recombee.ApiClient.Tests | ||
{ | ||
public class AddManualReqlSegmentUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestAddManualReqlSegment() | ||
{ | ||
AddManualReqlSegment req; | ||
RecombeeBinding resp; | ||
Object resp2; | ||
// it 'adds manual ReQL segment' | ||
resp2 = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); | ||
resp = client.Send(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); | ||
} | ||
|
||
[Fact] | ||
public async void TestAddManualReqlSegmentAsync() | ||
{ | ||
AddManualReqlSegment req; | ||
RecombeeBinding resp; | ||
Object resp2; | ||
// it 'adds manual ReQL segment' | ||
resp2 = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); | ||
resp = await client.SendAsync(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
Src/Recombee.ApiClient.Tests/CreateAutoReqlSegmentationBatchUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Xunit; | ||
using Recombee.ApiClient.ApiRequests; | ||
using Recombee.ApiClient.Bindings; | ||
|
||
namespace Recombee.ApiClient.Tests | ||
{ | ||
public class CreateAutoReqlSegmentationBatchUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestCreateAutoReqlSegmentation() | ||
{ | ||
Object resp2; | ||
Request[] requests = new Request[] { | ||
new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes"), | ||
new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes") | ||
}; | ||
|
||
BatchResponse batchResponse = client.Send(new Batch(requests)); | ||
Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); | ||
} | ||
|
||
[Fact] | ||
public async void TestCreateAutoReqlSegmentationAsync() | ||
{ | ||
Object resp2; | ||
Request[] requests = new Request[] { | ||
new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes"), | ||
new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes") | ||
}; | ||
|
||
BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); | ||
Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
Src/Recombee.ApiClient.Tests/CreateAutoReqlSegmentationUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Xunit; | ||
using Recombee.ApiClient.ApiRequests; | ||
using Recombee.ApiClient.Bindings; | ||
|
||
namespace Recombee.ApiClient.Tests | ||
{ | ||
public class CreateAutoReqlSegmentationUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestCreateAutoReqlSegmentation() | ||
{ | ||
CreateAutoReqlSegmentation req; | ||
RecombeeBinding resp; | ||
Object resp2; | ||
// it 'creates auto ReQL segmentation' | ||
resp = client.Send(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); | ||
try | ||
{ | ||
client.Send(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); | ||
Assert.True(false,"No exception thrown"); | ||
} | ||
catch (ResponseException ex) | ||
{ | ||
Assert.Equal(409, (int)ex.StatusCode); | ||
} | ||
} | ||
|
||
[Fact] | ||
public async void TestCreateAutoReqlSegmentationAsync() | ||
{ | ||
CreateAutoReqlSegmentation req; | ||
RecombeeBinding resp; | ||
Object resp2; | ||
// it 'creates auto ReQL segmentation' | ||
resp = await client.SendAsync(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); | ||
try | ||
{ | ||
await client.SendAsync(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); | ||
Assert.True(false,"No exception thrown"); | ||
} | ||
catch (ResponseException ex) | ||
{ | ||
Assert.Equal(409, (int)ex.StatusCode); | ||
} | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
Src/Recombee.ApiClient.Tests/CreateManualReqlSegmentationBatchUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Xunit; | ||
using Recombee.ApiClient.ApiRequests; | ||
using Recombee.ApiClient.Bindings; | ||
|
||
namespace Recombee.ApiClient.Tests | ||
{ | ||
public class CreateManualReqlSegmentationBatchUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestCreateManualReqlSegmentation() | ||
{ | ||
Object resp2; | ||
Request[] requests = new Request[] { | ||
new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes"), | ||
new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes") | ||
}; | ||
|
||
BatchResponse batchResponse = client.Send(new Batch(requests)); | ||
Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); | ||
} | ||
|
||
[Fact] | ||
public async void TestCreateManualReqlSegmentationAsync() | ||
{ | ||
Object resp2; | ||
Request[] requests = new Request[] { | ||
new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes"), | ||
new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes") | ||
}; | ||
|
||
BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); | ||
Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
Src/Recombee.ApiClient.Tests/CreateManualReqlSegmentationUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Xunit; | ||
using Recombee.ApiClient.ApiRequests; | ||
using Recombee.ApiClient.Bindings; | ||
|
||
namespace Recombee.ApiClient.Tests | ||
{ | ||
public class CreateManualReqlSegmentationUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestCreateManualReqlSegmentation() | ||
{ | ||
CreateManualReqlSegmentation req; | ||
RecombeeBinding resp; | ||
Object resp2; | ||
// it 'creates manual ReQL segmentation' | ||
resp = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); | ||
try | ||
{ | ||
client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); | ||
Assert.True(false,"No exception thrown"); | ||
} | ||
catch (ResponseException ex) | ||
{ | ||
Assert.Equal(409, (int)ex.StatusCode); | ||
} | ||
} | ||
|
||
[Fact] | ||
public async void TestCreateManualReqlSegmentationAsync() | ||
{ | ||
CreateManualReqlSegmentation req; | ||
RecombeeBinding resp; | ||
Object resp2; | ||
// it 'creates manual ReQL segmentation' | ||
resp = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); | ||
try | ||
{ | ||
await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); | ||
Assert.True(false,"No exception thrown"); | ||
} | ||
catch (ResponseException ex) | ||
{ | ||
Assert.Equal(409, (int)ex.StatusCode); | ||
} | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
Src/Recombee.ApiClient.Tests/CreatePropertyBasedSegmentationBatchUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Xunit; | ||
using Recombee.ApiClient.ApiRequests; | ||
using Recombee.ApiClient.Bindings; | ||
|
||
namespace Recombee.ApiClient.Tests | ||
{ | ||
public class CreatePropertyBasedSegmentationBatchUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestCreatePropertyBasedSegmentation() | ||
{ | ||
Object resp2; | ||
Request[] requests = new Request[] { | ||
new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes"), | ||
new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes") | ||
}; | ||
|
||
BatchResponse batchResponse = client.Send(new Batch(requests)); | ||
Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); | ||
} | ||
|
||
[Fact] | ||
public async void TestCreatePropertyBasedSegmentationAsync() | ||
{ | ||
Object resp2; | ||
Request[] requests = new Request[] { | ||
new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes"), | ||
new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes") | ||
}; | ||
|
||
BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); | ||
Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
Src/Recombee.ApiClient.Tests/CreatePropertyBasedSegmentationUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Xunit; | ||
using Recombee.ApiClient.ApiRequests; | ||
using Recombee.ApiClient.Bindings; | ||
|
||
namespace Recombee.ApiClient.Tests | ||
{ | ||
public class CreatePropertyBasedSegmentationUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestCreatePropertyBasedSegmentation() | ||
{ | ||
CreatePropertyBasedSegmentation req; | ||
RecombeeBinding resp; | ||
Object resp2; | ||
// it 'creates property based segmentation' | ||
resp = client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes")); | ||
try | ||
{ | ||
client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes")); | ||
Assert.True(false,"No exception thrown"); | ||
} | ||
catch (ResponseException ex) | ||
{ | ||
Assert.Equal(409, (int)ex.StatusCode); | ||
} | ||
} | ||
|
||
[Fact] | ||
public async void TestCreatePropertyBasedSegmentationAsync() | ||
{ | ||
CreatePropertyBasedSegmentation req; | ||
RecombeeBinding resp; | ||
Object resp2; | ||
// it 'creates property based segmentation' | ||
resp = await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes")); | ||
try | ||
{ | ||
await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes")); | ||
Assert.True(false,"No exception thrown"); | ||
} | ||
catch (ResponseException ex) | ||
{ | ||
Assert.Equal(409, (int)ex.StatusCode); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.