public void IsBandColorValid() { var mockPieRepository = new ResistorBandRepository(); ////arrange var OhmsCalculatorService = new OhmsCalculatorService(mockPieRepository); bool isValid = OhmsCalculatorService.IsValid("Red", "Red", "Red", "Red"); //assert Assert.True(isValid); }
public void OhmsCalculator2() { var mockPieRepository = new ResistorBandRepository(); ////arrange var OhmsCalculatorService = new OhmsCalculatorService(mockPieRepository); var ohms = OhmsCalculatorService.CalculateOhmValue("Red", "Yellow", "DeepPink", "Red"); //assert Assert.Equal(.024, ohms); }
public void RejectInvalidBandCColors(string color) { var mockPieRepository = new ResistorBandRepository(); var OhmsCalculatorService = new OhmsCalculatorService(mockPieRepository); ////arrange bool isValid = OhmsCalculatorService.IsValidBandCColor(color); //assert Assert.False(isValid); }
public void ShouldAcceptBandAColors(string color) { var mockPieRepository = new ResistorBandRepository(); var OhmsCalculatorService = new OhmsCalculatorService(mockPieRepository); ////arrange bool isValid = OhmsCalculatorService.IsValidBandABColor(color); //assert Assert.True(isValid); }
public void RejectInvalidInput(string bandAcolor, string bandBcolor, string bandCcolor, string bandDcolor) { var mockPieRepository = new ResistorBandRepository(); ////arrange var OhmsCalculatorService = new OhmsCalculatorService(mockPieRepository); var ohms = OhmsCalculatorService.CalculateOhmValue(bandAcolor, bandBcolor, bandCcolor, bandDcolor); //assert Assert.Equal(-1, ohms); }
public void AcceptOhmsValueWYDB(string bandAcolor, string bandBcolor, string bandCcolor, string bandDcolor) { var mockPieRepository = new ResistorBandRepository(); ////arrange var OhmsCalculatorService = new OhmsCalculatorService(mockPieRepository); var ohms = OhmsCalculatorService.CalculateOhmValue(bandAcolor, bandBcolor, bandCcolor, bandDcolor); //assert Assert.Equal(.094, ohms); }