mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 11:05:56 +00:00
Rename to Octokit to be consistent with other API libs
GitHub is naming all of the libraries Octokit for their respective platforms
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
using Xunit.Extensions;
|
||||
|
||||
namespace Octokit.Tests.Helpers
|
||||
{
|
||||
public class StringExtensionsTests
|
||||
{
|
||||
public class TheIsBlankMethod
|
||||
{
|
||||
[InlineData(null, true)]
|
||||
[InlineData("", true)]
|
||||
[InlineData(" ", true)]
|
||||
[InlineData("nope", false)]
|
||||
[Theory]
|
||||
public void ProperlyDetectsBlankStrings(string data, bool expected)
|
||||
{
|
||||
data.IsBlank().Should().Be(expected);
|
||||
}
|
||||
}
|
||||
|
||||
public class TheIsNotBlankMethod
|
||||
{
|
||||
[InlineData(null, false)]
|
||||
[InlineData("", false)]
|
||||
[InlineData(" ", false)]
|
||||
[InlineData("nope", true)]
|
||||
[Theory]
|
||||
public void ProperlyDetectsBlankStrings(string data, bool expected)
|
||||
{
|
||||
data.IsNotBlank().Should().Be(expected);
|
||||
}
|
||||
}
|
||||
|
||||
public class TheToRubyCaseMethod
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("Id", "id")]
|
||||
[InlineData("FirstName", "first_name")]
|
||||
public void ConvertsPascalToRuby(string source, string expected)
|
||||
{
|
||||
source.ToRubyCase().Should().Be(expected);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EnsuresArgumentsNotNullOrEmpty()
|
||||
{
|
||||
string nullString = null;
|
||||
Assert.Throws<ArgumentNullException>(() => nullString.ToRubyCase());
|
||||
Assert.Throws<ArgumentException>(() => "".ToRubyCase());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user