-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renaming unit tests and creating unit testing for DataValidator. rela…
…ted #1
- Loading branch information
1 parent
87251da
commit 985a669
Showing
3 changed files
with
48 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using NUnit.Framework; | ||
using PetStore.Core.Helper; | ||
|
||
namespace PetStore.Core.Test.Helper | ||
{ | ||
[TestFixture] | ||
public class DataValidatorTest | ||
{ | ||
[Test] | ||
public void IsEmail_ShouldReturnCorrectTrue() | ||
{ | ||
const string validEmail = "[email protected]"; | ||
|
||
bool result = DataValidator.IsEmail(validEmail); | ||
|
||
Assert.IsTrue(result); | ||
} | ||
[Test] | ||
public void IsEmail_ShouldReturnCorrectFalse() | ||
{ | ||
const string invalidEmail = "andre.azevedo"; | ||
|
||
bool result = DataValidator.IsEmail(invalidEmail); | ||
|
||
Assert.IsFalse(result); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters