public void TestBadColor()
        {
            var mock = new Mock<IResistorRepository>();
            mock.Setup(x => x.GetResistor(It.IsAny<string>())).Returns(new List<Resistor>().AsQueryable());

            var resistorService = new ResistorService(mock.Object);

            Assert.Throws<ArgumentException>(() =>
                resistorService.CalculateOhmValue("bad", "bad", "bad", "bad")
            );
        }
        public void TestBYRR()
        {
            //Arrange
            var resistorService = new ResistorService(MockRepository.Object);

            //Act
            var ohms = resistorService.CalculateOhmValue("blue", "yellow", "red", "red");

            //Assert
            Assert.Equal(6400, ohms);
        }
 public ResistorController(ResistorService resistorService)
 {
     _resistorService = resistorService;
 }