public void ThatCategoriesAreDistinct()
        {
            var testCase = new TestCase(
                "whatever",
                new Uri(NUnitTestAdapter.ExecutorUri),
                "someassemblyname")
            {
                DisplayName  = nameof(ThatCategoriesAreDistinct),
                CodeFilePath = null,
                LineNumber   = 0
            };
            var settings = Substitute.For <IAdapterSettings>();

            settings.VsTestCategoryType.Returns(VsTestCategoryType.NUnit);
            var cl = new CategoryList(testCase, settings);

            cl.AddRange(new List <string> {
                "one", "one", "two", "two"
            });
            cl.UpdateCategoriesToVs();

            var returnedCategoryList = testCase.GetCategories();

            Assert.That(returnedCategoryList.Count(), Is.EqualTo(2), $"Found {testCase.GetCategories().Count()} category entries");
        }
        public async void InitCategories()
        {
            var categories = await DataRequester.RequestCategory();

            if (categories == null)
            {
                return;
            }

            CategoryList.AddRange(categories.others);

            if (CategoryList.Count > 0)
            {
                CategoryName = CategoryList[0].name;
            }
        }
Exemplo n.º 3
0
 public EmoteCategoryAttribute(params uint[] emoteCategorys)
 {
     CategoryList.AddRange(emoteCategorys.ToList().Cast <EmoteCategory>());
 }
Exemplo n.º 4
0
 public EmoteCategoryAttribute(params EmoteCategory[] emoteCategorys)
 {
     CategoryList.AddRange(emoteCategorys);
 }