Example #1
0
        public void GetJewelByID_ShouldReturnTheRightMediaSetYellowGold()
        {
            //Arrange
            settingManager.Stub(x => x.GetJewelryBaseWebPath()).Return("/jon-images/jewel/");
            settingManager.Stub(x => x.GetJewelryBaseDiskPath()).Return(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\");

            JewelRepository jewelRepository = new JewelRepository(settingManager);
            //Act
            var jewel = jewelRepository.GetJewelByID(59325);

            //Assert
            jewel.MediaSetsOwnedByJewel.Should().Be(JewelMediaType.YellowGold);
        }
Example #2
0
        public void GetJewelByID_ShouldReturnNullIfYellowGoldRequestedButBotPresent()
        {
            //Arrange
            settingManager.Stub(x => x.GetJewelryBaseWebPath()).Return("/jon-images/jewel/");
            settingManager.Stub(x => x.GetJewelryBaseDiskPath()).Return(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\");

            JewelRepository jewelRepository = new JewelRepository(settingManager);

            jewelRepository.FilterMediaByMetal(JewelMediaType.YellowGold);
            //Act
            var jewel = jewelRepository.GetJewelByID(59324);

            //Assert
            jewel.Should().BeNull();
        }