public async Task GetImagesSrcRangeAsyncIsNotSameCategoryTest() { //arange DeviantManager dm = new DeviantManager(new StubDeviantArtRepository()); var expectedCount = 3; //act var c = await dm.GetImagesSrcRangeAsync(true, new CategoryItem() { ImageCategory = ImageCatogory.hot }); c = await dm.GetImagesSrcRangeAsync(true, new CategoryItem() { ImageCategory = ImageCatogory.hot }); c = await dm.GetImagesSrcRangeAsync(false, new CategoryItem() { ImageCategory = ImageCatogory.hot }); //asert Assert.IsTrue(expectedCount == c.ToList().Count()); }
public void GetImagesCategoriesTest() { //arange DeviantManager dm = new DeviantManager(new StubDeviantArtRepository()); var expectedCount = 10; //act var c = dm.GetImagesCategories(); //asert Assert.IsTrue(expectedCount == c.Count()); }
public async Task GetImageSourceToDownloadAsyncTest() { //arange DeviantManager dm = new DeviantManager(new StubDeviantArtRepository()); var expectedSrc = "Src"; //act var currentSrc = await dm.GetImageSourceToDownloadAsync("FakeId"); //asert Assert.IsTrue(expectedSrc == currentSrc); }
public async Task GetImagesSrcRangeAsyncTest() { //arange DeviantManager dm = new DeviantManager(new StubDeviantArtRepository()); bool expectedIsDownloadable = false; //act var c = await dm.GetImagesSrcRangeAsync(0, new CategoryItem() { ImageCategory = ImageCatogory.hot }); var currentIsDownloadable = c.ToList()[1].IsDownloadable; //asert Assert.IsTrue(expectedIsDownloadable == currentIsDownloadable); }