public void IsPrime_ValuesLessThan2_ReturnFalse(int value) { using (PrimeServiceController primeService = CreatePrimeService()) { var result = primeService.IsPrime(value); Assert.IsFalse(result, $"{value} should not be prime"); } }
public void IsPrime_InputIs1_ReturnFalse() { using (PrimeServiceController primeService = CreatePrimeService()) { var result = primeService.IsPrime(1); Assert.IsFalse(result, "1 should not be prime"); } }
public void When_MatrixIsLessThanThreeByThree_Then_IsMagicSquareFalse() { var matrix = new List <List <decimal> > { new List <decimal> { 1.0m, 2.0m }, new List <decimal> { 4.0m, 4.0m } }; Assert.IsTrue(PrimeServiceController.isMagicSquare(matrix)); }