public void MutantService_IsDnaValid_OneInvalidWhiteSpaceInTheMiddle_Fails() { //Arrange MutantService service = GetMutantService(); string[] dna = { "AGT", "A C", "CCW" }; //==> " " is invalid //Action & Asserts Assert.ThrowsException <DnaInvalidException>(() => service.IsDnaValid(dna)); }
public void MutantService_IsDnaValid_OneInvalidLetterAtTheEnd_Fails() { //Arrange MutantService service = GetMutantService(); string[] dna = { "AGT", "ATC", "CCW" }; //==> W is invalid //Action & Asserts Assert.ThrowsException <DnaInvalidException>(() => service.IsDnaValid(dna)); }
public void MutantService_IsDnaValid_DnaNxM_Fails() { //Arrange MutantService service = GetMutantService(); string[] dna = { "AGA", "AT", "CCT" }; //Action & Asserts Assert.ThrowsException <DnaInvalidException>(() => service.IsDnaValid(dna)); }
public void MutantService_IsDnaValid_DnaInNull_Fails() { //Arrange MutantService service = GetMutantService(); string[] dna = null; //Action & Asserts Assert.ThrowsException <DnaInvalidException>(() => service.IsDnaValid(dna)); }
public void MutantService_IsDnaValid_ValidDna4x4_Succeeds() { //Arrange MutantService service = GetMutantService(); string[] dna = { "AGTA", "ATCA", "ACCA", "TGAC" }; //Action bool result = service.IsDnaValid(dna); //Asserts Assert.IsTrue(result); }
public void MutantService_IsDnaValid_ValidDna5x5_Succeeds() { //Arrange MutantService service = GetMutantService(); string[] dna = { "AGATT", "TATGC", "CCAGT", "AACGT", "CCGGT" }; //Action bool result = service.IsDnaValid(dna); //Asserts Assert.IsTrue(result); }