public void SecretCodeTest_IsValidCorrectData_ShouldIsTrue()
 {
     //arrange
     object var = "afrts-bahab-abtga-asery";
     SecretCodeAttribute attr = new SecretCodeAttribute();
     //act
     bool result = attr.IsValid(var);
     //assert
     Assert.IsTrue(result);
 }
 public void SecretCodeTest_IsNotValidIncorrectSymb_ShouldIsFalse()
 {
     //arrange
     object var = "jafaratatatatatatatatata";
     SecretCodeAttribute attr = new SecretCodeAttribute();
     //act
     bool result = attr.IsValid(var);
     //assert
     Assert.IsFalse(result);
 }
 public void SecretCodeTest_IsNotValidNull_ShouldIsFalse()
 {
     //arrange
     object var = null;
     SecretCodeAttribute attr = new SecretCodeAttribute();
     //act
     bool result = attr.IsValid(var);
     //assert
     Assert.IsFalse(result);
 }
 public void SecretCodeAttr_InvalidDataLess_ShouldSetFalse()
 {
     //arrange
     SecretCodeAttribute attr = new SecretCodeAttribute();
     string code = "FFFFF-77777-FFFFF-FFFF";
     //act
     bool result = attr.IsValid(code);
     //assert
     Assert.IsFalse(result);
 }
 public void SecretCodeAttr_InvalidDataBigger_ShouldSetFalse()
 {
     //arrange
     SecretCodeAttribute attr = new SecretCodeAttribute();
     string code = "adser-fgtyf-fhyfhf-bfhff";
     //act
     bool result = attr.IsValid(code);
     //assert
     Assert.IsFalse(result);
 }
 public void SecretCodeAttr_InvalidData23_ShouldSetFalse()
 {
     //arrange
     SecretCodeAttribute attr = new SecretCodeAttribute();
     string code = "45201-fffff-yyyyyy-ffff";
     //act
     bool result = attr.IsValid(code);
     //assert
     Assert.IsFalse(result);
 }
 public void SecretCodeAttr_InvalidDataNull_ShouldGetErrMsg()
 {
     //arrange
     SecretCodeAttribute attr = new SecretCodeAttribute();
     //act
     bool result = attr.IsValid("");
     //assert
     Assert.IsFalse(result);
 }
 public void SecretCodeAttr_ValidData_ShouldSetTrue()
 {
     //arrange
     SecretCodeAttribute attr = new SecretCodeAttribute();
     string code = "452Fs-aSERc-78GFc-ERTcc";
     //act
     bool result = attr.IsValid(code);
     //assert
     Assert.IsTrue(result);
 }
 public void SecretCodeAttr_InvalidDataSymb_ShouldSetFalse()
 {
     //arrange
     SecretCodeAttribute attr = new SecretCodeAttribute();
     string code = "458uhgfredsbhhgfrsaewqq";
     //act
     bool result = attr.IsValid(code);
     //assert
     Assert.IsFalse(result);
 }
 public void SecretCodeAttr_InvalidDataSameSymb_ShouldSetFalse()
 {
     //arrange
     SecretCodeAttribute attr = new SecretCodeAttribute();
     string code = "aaaaa-aaaaa-aaaaa-aaaaa";
     //act
     bool result = attr.IsValid(code);
     //assert
     Assert.IsFalse(result);
 }