/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Testing/test/RepeatTest.cs
42 строки
894 B
William Godbe
Rename Microsoft.Aspnetcore.Testing to Microsoft.AspNetCore.InternalTesting (#51713)
02 ноя 2023, 03:15
Не верифицирован
02 ноя 2023, 03:15
fc8deca
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Xunit; namespace Microsoft.AspNetCore.InternalTesting; [Repeat] public class RepeatTest { public static int _runCount = 0; [Fact] [Repeat(5)] public void RepeatLimitIsSetCorrectly() { Assert.Equal(5, RepeatContext.Current.Limit); } [Fact] [Repeat(5)] public void RepeatRunsTestSpecifiedNumberOfTimes() { Assert.Equal(RepeatContext.Current.CurrentIteration, _runCount); _runCount++; } [Fact] public void RepeatCanBeSetOnClass() { Assert.Equal(10, RepeatContext.Current.Limit); } } public class LoggedTestXunitRepeatAssemblyTests { [Fact] public void RepeatCanBeSetOnAssembly() { Assert.Equal(1, RepeatContext.Current.Limit); } }