public void GetCategoriesFaultsOnNullUser() { FakeUserService userService = new FakeUserService(); MetaWeblogAPI service = new MetaWeblogAPI(null, null, userService, null, null); Assert.Throws <ArgumentException>(() => service.GetCategories(null, null, null)); }
public void GetCategoriesReturnsAllTags() { FakeTagService tagService = new FakeTagService(); FakeUserService userService = new FakeUserService(); tagService.StoredTags.Add("test", new Oxite.Models.Tag() { Name = "test" }); MetaWeblogAPI service = new MetaWeblogAPI(null, null, userService, tagService, null); CategoryInfo[] categories = service.GetCategories(null, "test", "test"); Assert.Equal(1, categories.Length); Assert.Equal("test", categories[0].description); }