-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from dills122/AddScrubMode
Add scrub mode
- Loading branch information
Showing
11 changed files
with
105 additions
and
38 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
namespace ShamWow.Constants | ||
{ | ||
public enum ScrubTypes | ||
public enum ScrubMode | ||
{ | ||
Full, | ||
Marked | ||
|
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,36 @@ | ||
using ShamWow.Processor; | ||
using ShamWowTests.TestModels; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Xunit; | ||
|
||
namespace ShamWow.Tests | ||
{ | ||
public class MarkedTest | ||
{ | ||
[Fact] | ||
public void MarkedScrubModeTest() | ||
{ | ||
const string email = "this really isn't an email right?"; | ||
const string stayTheSame = "This should be.."; | ||
var model = new SimpleTest | ||
{ | ||
emailStr = email, | ||
KeepMeTheSame = stayTheSame | ||
}; | ||
|
||
IShamWow processor = ShamWowEngine.GetFactory().Create(model, Constants.ScrubMode.Marked); | ||
processor.Scrub(); | ||
|
||
var cleanData = (SimpleTest)processor.CleanData(); | ||
var man = processor.GetManifest(); | ||
var IsSuccessful = processor.CheckManifest(); | ||
|
||
Assert.IsType<SimpleTest>(cleanData); | ||
Assert.True(IsSuccessful); | ||
Assert.Equal(stayTheSame, cleanData.KeepMeTheSame); | ||
Assert.NotEqual(email, cleanData.emailStr); | ||
} | ||
} | ||
} |
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
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
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
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