mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 12:42:32 +00:00
Chnage LastApiInfo to GetLastApiInfo with cloned version
This commit is contained in:
@@ -109,6 +109,30 @@ namespace Octokit.Tests.Http
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>(() => new RateLimit(null));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class TheMethods
|
||||
{
|
||||
[Fact]
|
||||
public void CanClone()
|
||||
{
|
||||
var original = new RateLimit(100, 42, 1372700873);
|
||||
|
||||
var clone = original.Clone();
|
||||
|
||||
// Note the use of Assert.NotSame tests for value types - this should continue to test should the underlying
|
||||
// model are changed to Object types
|
||||
Assert.NotSame(original, clone);
|
||||
Assert.Equal(original.Limit, clone.Limit);
|
||||
Assert.NotSame(original.Limit, clone.Limit);
|
||||
Assert.Equal(original.Remaining, clone.Remaining);
|
||||
Assert.NotSame(original.Remaining, clone.Remaining);
|
||||
Assert.Equal(original.ResetAsUtcEpochSeconds, clone.ResetAsUtcEpochSeconds);
|
||||
Assert.NotSame(original.ResetAsUtcEpochSeconds, clone.ResetAsUtcEpochSeconds);
|
||||
Assert.Equal(original.Reset, clone.Reset);
|
||||
Assert.NotSame(original.Reset, clone.Reset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user