public void Equals_Both_Null_Returns_True() { // Arrange // Act var equals = QuotaOptions.Equals(null, null); // Assert Assert.True(equals); }
private static async Task <int> OnGetQuota(QuotaOptions options) { Console.WriteLine($"Getting global storage quota for scid : {options.ServiceConfigurationId}, sandbox {options.Sandbox}"); GlobalStorageQuotaInfo result = await TitleStorage.GetGlobalStorageQuotaAsync(options.ServiceConfigurationId, options.Sandbox); Console.WriteLine($"Total bytes : {result.QuotaBytes}, used bytes {result.UsedBytes}"); return(0); }
public void Equals_Second_Null_Returns_False() { var options1 = new QuotaOptions { Average = 10, Burst = 100, }; var equals = QuotaOptions.Equals(options1, null); Assert.False(equals); }
public void Equals_First_Null_Returns_False() { var options2 = new QuotaOptions { Average = 20, Burst = 200, }; var equals = QuotaOptions.Equals(null, options2); Assert.False(equals); }
public void DeepClone_Works() { var sut = new QuotaOptions { Average = 10, Burst = 100, }; var clone = sut.DeepClone(); Assert.NotSame(sut, clone); Assert.Equal(sut.Average, clone.Average); Assert.Equal(sut.Burst, clone.Burst); }
internal static bool Equals(QuotaOptions options1, QuotaOptions options2) { if (options1 == null && options2 == null) { return(true); } if (options1 == null || options2 == null) { return(false); } return(options1.Average == options2.Average && options1.Burst == options2.Burst); }
public void DeepClone_Works() { // Arrange var sut = new QuotaOptions { Average = 10, Burst = 100, }; // Act var clone = sut.DeepClone(); // Assert clone.Should().NotBeSameAs(sut); clone.Average.Should().Be(sut.Average); clone.Burst.Should().Be(sut.Burst); }
public void Equals_Different_Value_Returns_False() { var options1 = new QuotaOptions { Average = 10, Burst = 100, }; var options2 = new QuotaOptions { Average = 20, Burst = 200, }; var equals = QuotaOptions.Equals(options1, options2); Assert.False(equals); }
public void Equals_Same_Value_Returns_True() { var options1 = new QuotaOptions { Average = 10, Burst = 100, }; var options2 = new QuotaOptions { Average = 10, Burst = 100, }; var equals = QuotaOptions.Equals(options1, options2); Assert.True(equals); }
public void Equals_Both_Null_Returns_True() { var equals = QuotaOptions.Equals(null, null); Assert.True(equals); }