mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-05 23:06:10 +00:00
30 lines
811 B
C#
30 lines
811 B
C#
using System;
|
|
using Octokit;
|
|
using Octokit.Tests.Helpers;
|
|
using Xunit;
|
|
|
|
public class SearchRepositoryRequestTests
|
|
{
|
|
public class TheMergedQualifiersMethod
|
|
{
|
|
[Fact]
|
|
public void ReturnsAReadOnlyDictionary()
|
|
{
|
|
var request = new SearchCodeRequest("test");
|
|
|
|
var result = request.MergedQualifiers();
|
|
|
|
// If I can cast this to a writeable collection, then that defeats the purpose of a read only.
|
|
AssertEx.IsReadOnlyCollection<string>(result);
|
|
}
|
|
|
|
[Fact]
|
|
public void SortNotSpecifiedByDefault()
|
|
{
|
|
var request = new SearchCodeRequest("test");
|
|
Assert.True(string.IsNullOrWhiteSpace(request.Sort));
|
|
Assert.False(request.Parameters.ContainsKey("sort"));
|
|
}
|
|
}
|
|
}
|