Skip to content

Commit 54f63a5

Browse files
authored
csharp: Remove tests of generated code (#1153)
These tests are broken due to changes in underlying generated code. We probably don't need tests for the generated code, anyway, so removing.
1 parent f0718c0 commit 54f63a5

File tree

8 files changed

+0
-1935
lines changed

8 files changed

+0
-1935
lines changed

csharp/Svix.Tests/ApplicationTests.cs

Lines changed: 0 additions & 242 deletions
Original file line numberDiff line numberDiff line change
@@ -43,247 +43,5 @@ public void ApplicationCreateAsync_WithoutApplication_ThrowsException()
4343
// Assert
4444
Assert.ThrowsAsync<ArgumentNullException>(() => _svixClient.Application.CreateAsync(null, null, null, default));
4545
}
46-
47-
[Fact]
48-
public void ApplicationCreate_WithoutOptions_CallsApi_WithoutOptions()
49-
{
50-
// Arrange
51-
var lName = "app_name_08q73yhrngv";
52-
var lUid = "08273gh45";
53-
var lRateLimit = 30;
54-
55-
ApplicationCreateOptions lOptions = null;
56-
var lApplication = new ApplicationIn(lName, lRateLimit, lUid);
57-
58-
// Act
59-
var lApplicationOut = _svixClient.Application.Create(lApplication, lOptions, null);
60-
61-
// Assert
62-
_mockApplicationApi.Verify(x => x.CreateApplicationApiV1AppPost(lApplication, It.IsAny<bool>(), null));
63-
}
64-
65-
[Fact]
66-
public void ApplicationCreateAsync_WithoutOptions_CallsApi_WithoutOptions()
67-
{
68-
// Arrange
69-
var lName = "app_name_08q73yhrngv";
70-
var lUid = "08273gh45";
71-
var lRateLimit = 30;
72-
73-
ApplicationCreateOptions lOptions = null;
74-
var lApplication = new ApplicationIn(lName, lRateLimit, lUid);
75-
76-
// Act
77-
var lResult = _svixClient.Application.CreateAsync(lApplication, lOptions, null, default);
78-
79-
// Assert
80-
_mockApplicationApi.Verify(x => x.CreateApplicationApiV1AppPostAsync(lApplication, It.IsAny<bool>(), null, default));
81-
}
82-
83-
[Fact]
84-
public void ApplicationCreate_WithOptions_CallsApi_WithOptions()
85-
{
86-
// Arrange
87-
var lName = "app_name_08q73yhrngv";
88-
var lUid = "08273gh45";
89-
var lRateLimit = 30;
90-
91-
var lApplication = new ApplicationIn(lName, lRateLimit, lUid);
92-
ApplicationCreateOptions lOptions = new ApplicationCreateOptions
93-
{
94-
GetIfExists = true
95-
};
96-
97-
// Act
98-
var lApplicationOut = _svixClient.Application.Create(lApplication, lOptions, null);
99-
100-
// Assert
101-
_mockApplicationApi.Verify(x => x.CreateApplicationApiV1AppPost(lApplication, true, null));
102-
}
103-
104-
[Fact]
105-
public void ApplicationCreateAsync_WithOptions_CallsApi_WithOptions()
106-
{
107-
// Arrange
108-
var lName = "app_name_08q73yhrngv";
109-
var lUid = "08273gh45";
110-
var lRateLimit = 30;
111-
112-
var lApplication = new ApplicationIn(lName, lRateLimit, lUid);
113-
ApplicationCreateOptions lOptions = new ApplicationCreateOptions
114-
{
115-
GetIfExists = true
116-
};
117-
118-
// Act
119-
var lApplicationOut = _svixClient.Application.CreateAsync(lApplication, lOptions, null, default);
120-
121-
// Assert
122-
_mockApplicationApi.Verify(x => x.CreateApplicationApiV1AppPostAsync(lApplication, true, null, default));
123-
}
124-
125-
[Fact]
126-
public void ApplicationDelete_CallsAPi_WithParams()
127-
{
128-
// Arrange
129-
string lApplicationId = "app_1srOrx2ZWZBpBUvZwXKQmoEYga2";
130-
string lIdempotencyKey = Guid.NewGuid().ToString();
131-
132-
_mockApplicationApi.Setup(x => x.DeleteApplicationApiV1AppAppIdDeleteWithHttpInfo(It.IsAny<string>(), It.IsAny<string>()))
133-
.Returns(new ApiResponse<object>(HttpStatusCode.NoContent, null));
134-
135-
// Act
136-
var lResult = _svixClient.Application.Delete(lApplicationId, lIdempotencyKey);
137-
138-
// Assert
139-
_mockApplicationApi.Verify(x => x.DeleteApplicationApiV1AppAppIdDeleteWithHttpInfo(lApplicationId, lIdempotencyKey));
140-
}
141-
142-
[Fact]
143-
public void ApplicationDeleteAsync_CallsAPi_WithParams()
144-
{
145-
// Arrange
146-
string lApplicationId = "app_1srOrx2ZWZBpBUvZwXKQmoEYga2";
147-
string lIdempotencyKey = Guid.NewGuid().ToString();
148-
149-
_mockApplicationApi.Setup(x => x.DeleteApplicationApiV1AppAppIdDeleteWithHttpInfoAsync(It.IsAny<string>(), It.IsAny<string>(), default))
150-
.ReturnsAsync(new ApiResponse<object>(HttpStatusCode.NoContent, null));
151-
152-
// Act
153-
var lResult = _svixClient.Application.DeleteAsync(lApplicationId, lIdempotencyKey, default);
154-
155-
// Assert
156-
_mockApplicationApi.Verify(x => x.DeleteApplicationApiV1AppAppIdDeleteWithHttpInfoAsync(lApplicationId, lIdempotencyKey, default));
157-
}
158-
159-
[Fact]
160-
public void ApplicationGet_CallsAPi_WithParams()
161-
{
162-
// Arrange
163-
string lApplicationId = "app_1srOrx2ZWZBpBUvZwXKQmoEYga2";
164-
string lIdempotencyKey = Guid.NewGuid().ToString();
165-
166-
// Act
167-
var lResult = _svixClient.Application.Get(lApplicationId, lIdempotencyKey);
168-
169-
// Assert
170-
_mockApplicationApi.Verify(x => x.GetApplicationApiV1AppAppIdGet(lApplicationId, lIdempotencyKey));
171-
}
172-
173-
[Fact]
174-
public void ApplicationGetAsync_CallsAPi_WithParams()
175-
{
176-
// Arrange
177-
string lApplicationId = "app_1srOrx2ZWZBpBUvZwXKQmoEYga2";
178-
string lIdempotencyKey = Guid.NewGuid().ToString();
179-
180-
// Act
181-
var lResult = _svixClient.Application.GetAsync(lApplicationId, lIdempotencyKey, default);
182-
183-
// Assert
184-
_mockApplicationApi.Verify(x => x.GetApplicationApiV1AppAppIdGetAsync(lApplicationId, lIdempotencyKey, default));
185-
}
186-
187-
[Fact]
188-
public void ApplicationList_WithoutOptions_CallsApi_WithoutOptions()
189-
{
190-
// Arrange
191-
ListOptions lOptions = null;
192-
193-
// Act
194-
var lResult = _svixClient.Application
195-
.List(lOptions);
196-
197-
// Assert
198-
_mockApplicationApi.Verify(x => x.ListApplicationsApiV1AppGet(null, null, null));
199-
}
200-
201-
[Fact]
202-
public void ApplicationListAsync_WithoutOptions_CallsApi_WithoutOptions()
203-
{
204-
// Arrange
205-
ListOptions lOptions = null;
206-
207-
// Act
208-
var lResult = _svixClient.Application
209-
.ListAsync(lOptions);
210-
211-
// Assert
212-
_mockApplicationApi.Verify(x => x.ListApplicationsApiV1AppGetAsync(null, null, null, default));
213-
}
214-
215-
[Fact]
216-
public void ApplicationList_WithOptions_CallsApi_WithOptions()
217-
{
218-
// Arrange
219-
var lIterator = "app_1srOrx2ZWZBpBUvZwXKQmoEYga2";
220-
var lLimit = 30;
221-
222-
var lOptions = new ListOptions
223-
{
224-
Iterator = lIterator,
225-
Limit = lLimit
226-
};
227-
228-
// Act
229-
var lResult = _svixClient.Application
230-
.List(lOptions);
231-
232-
// Assert
233-
_mockApplicationApi.Verify(x => x.ListApplicationsApiV1AppGet(lIterator, lLimit, null));
234-
}
235-
236-
[Fact]
237-
public void ApplicationListAsync_WithOptions_CallsApi_WithOptions()
238-
{
239-
// Arrange
240-
var lIterator = "app_1srOrx2ZWZBpBUvZwXKQmoEYga2";
241-
var lLimit = 30;
242-
243-
var lOptions = new ListOptions
244-
{
245-
Iterator = lIterator,
246-
Limit = lLimit
247-
};
248-
249-
// Act
250-
var lResult = _svixClient.Application
251-
.ListAsync(lOptions);
252-
253-
// Assert
254-
_mockApplicationApi.Verify(x => x.ListApplicationsApiV1AppGetAsync(lIterator, lLimit, null, default));
255-
}
256-
257-
[Fact]
258-
public void ApplicationUpdate_CallsAPi_WithParams()
259-
{
260-
// Arrange
261-
string lApplicationId = "app_1srOrx2ZWZBpBUvZwXKQmoEYga2";
262-
string lIdempotencyKey = Guid.NewGuid().ToString();
263-
264-
var lApplication = new ApplicationIn("MyApplication");
265-
266-
// Act
267-
var lResult = _svixClient.Application.Update(lApplicationId, lApplication, lIdempotencyKey);
268-
269-
// Assert
270-
_mockApplicationApi.Verify(x => x.UpdateApplicationApiV1AppAppIdPut(lApplicationId, lApplication, lIdempotencyKey));
271-
}
272-
273-
[Fact]
274-
public void ApplicationUpdateAsync_CallsAPi_WithParams()
275-
{
276-
// Arrange
277-
string lApplicationId = "app_1srOrx2ZWZBpBUvZwXKQmoEYga2";
278-
string lIdempotencyKey = Guid.NewGuid().ToString();
279-
280-
var lApplication = new ApplicationIn("MyApplication");
281-
282-
// Act
283-
var lResult = _svixClient.Application.UpdateAsync(lApplicationId, lApplication, lIdempotencyKey, default);
284-
285-
// Assert
286-
_mockApplicationApi.Verify(x => x.UpdateApplicationApiV1AppAppIdPutAsync(lApplicationId, lApplication, lIdempotencyKey, default));
287-
}
28846
}
28947
}

csharp/Svix.Tests/AuthenticationTests.cs

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)