diff --git a/README.md b/README.md
index 6d560ac..4589374 100644
--- a/README.md
+++ b/README.md
@@ -32,8 +32,8 @@ Once your POCOs are annotated and you have installed the ShamWow NuGet package y
``` csharp
//Fake object
var obj = new object();
-//Get instance of ShamWow
-IShamWow processor = ShamWowEngine.GetFactory().Create(obj);
+//Get instance of ShamWow and run in marked only mode
+IShamWow processor = ShamWowEngine.GetFactory().Create(obj, ScrubMode.Marked);
```
#### Step 2 Scrubbing
diff --git a/ShamWow.Interfaces/Constants/ScrubbingType.cs b/ShamWow.Interfaces/Constants/ScrubbingType.cs
index c47b009..d4f9e84 100644
--- a/ShamWow.Interfaces/Constants/ScrubbingType.cs
+++ b/ShamWow.Interfaces/Constants/ScrubbingType.cs
@@ -1,6 +1,6 @@
namespace ShamWow.Constants
{
- public enum ScrubTypes
+ public enum ScrubMode
{
Full,
Marked
diff --git a/ShamWow.Interfaces/ShamWow.Interfaces.csproj b/ShamWow.Interfaces/ShamWow.Interfaces.csproj
index e831754..4bd3b3f 100644
--- a/ShamWow.Interfaces/ShamWow.Interfaces.csproj
+++ b/ShamWow.Interfaces/ShamWow.Interfaces.csproj
@@ -6,7 +6,7 @@
Dills122
Steele Inc.
true
- 2.0
+ 2.1
Attributes and scrubbers for ShamWow scrubber.
https://github.com/dills122/ShamWow/blob/master/LICENSE
diff --git a/ShamWow.Tests/MarkedTest.cs b/ShamWow.Tests/MarkedTest.cs
new file mode 100644
index 0000000..0b7d3f3
--- /dev/null
+++ b/ShamWow.Tests/MarkedTest.cs
@@ -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(cleanData);
+ Assert.True(IsSuccessful);
+ Assert.Equal(stayTheSame, cleanData.KeepMeTheSame);
+ Assert.NotEqual(email, cleanData.emailStr);
+ }
+ }
+}
diff --git a/ShamWow.Tests/PreserveValueTests.cs b/ShamWow.Tests/PreserveValueTests.cs
index e13eb2b..9ef2622 100644
--- a/ShamWow.Tests/PreserveValueTests.cs
+++ b/ShamWow.Tests/PreserveValueTests.cs
@@ -18,7 +18,7 @@ public void ScrubProperty_WithPredefinedValue()
i = 50
};
- IShamWow processor = ShamWowEngine.GetFactory().Create(model);
+ IShamWow processor = ShamWowEngine.GetFactory().Create(model, Constants.ScrubMode.Full);
processor.Scrub();
var cleanedData = (PreserveTest)processor.CleanData();
diff --git a/ShamWow.Tests/ScrubberTests.cs b/ShamWow.Tests/ScrubberTests.cs
index 0de58bc..e2f85c8 100644
--- a/ShamWow.Tests/ScrubberTests.cs
+++ b/ShamWow.Tests/ScrubberTests.cs
@@ -27,7 +27,7 @@ public void SimpleTest(string email)
Byte = Encoding.ASCII.GetBytes("Test STring")
};
- IShamWow processor = ShamWowEngine.GetFactory().Create(test);
+ IShamWow processor = ShamWowEngine.GetFactory().Create(test, Constants.ScrubMode.Marked);
processor.Scrub();
var cleanedData = (SimpleTest)processor.CleanData();
@@ -61,7 +61,7 @@ public void ComplexTest(string email, string phone)
}
};
- ShamWow.Processor.IShamWow processor = ShamWow.Processor.ShamWowEngine.GetFactory().Create(complex);
+ ShamWow.Processor.IShamWow processor = ShamWow.Processor.ShamWowEngine.GetFactory().Create(complex, Constants.ScrubMode.Marked);
processor.Scrub();
var cleanedData = (ComplexTest)processor.CleanData();
@@ -94,7 +94,7 @@ public void FullScrubModeTest(string email, string randString, string randString
};
- ShamWow.Processor.IShamWow processor = ShamWow.Processor.ShamWowEngine.GetFactory().Create(test);
+ ShamWow.Processor.IShamWow processor = ShamWow.Processor.ShamWowEngine.GetFactory().Create(test, Constants.ScrubMode.Marked);
processor.Scrub();
var cleanedData = (SimpleTest)processor.CleanData();
@@ -114,7 +114,7 @@ public void PreserveValue_DoesNotScrubTheMarkedValue()
KeepMeTheSame = expectedValue
};
- ShamWow.Processor.IShamWow processor = ShamWow.Processor.ShamWowEngine.GetFactory().Create(simpleTest);
+ ShamWow.Processor.IShamWow processor = ShamWow.Processor.ShamWowEngine.GetFactory().Create(simpleTest, Constants.ScrubMode.Marked);
processor.Scrub();
var cleanedData = (SimpleTest)processor.CleanData();
@@ -134,7 +134,7 @@ public void ArrayScrub_EnsureSameTypeArrayReturnedScrubbed()
str = "Test string"
};
- IShamWow processor = ShamWowEngine.GetFactory().Create(model);
+ IShamWow processor = ShamWowEngine.GetFactory().Create(model, Constants.ScrubMode.Full);
processor.Scrub();
var cleanedData = (ArrayTest)processor.CleanData();
@@ -159,7 +159,7 @@ public void FileScrub_EnsureFileIsScrubbed()
orderFile = Encoding.ASCII.GetBytes(fileStr)
};
- IShamWow processor = ShamWowEngine.GetFactory().Create(model);
+ IShamWow processor = ShamWowEngine.GetFactory().Create(model, Constants.ScrubMode.Full);
processor.Scrub();
var cleanData = (FileTest)processor.CleanData();
diff --git a/ShamWow.Tests/StatefulTests.cs b/ShamWow.Tests/StatefulTests.cs
index e57a80b..a4c8242 100644
--- a/ShamWow.Tests/StatefulTests.cs
+++ b/ShamWow.Tests/StatefulTests.cs
@@ -25,7 +25,7 @@ public void TestStatefulAttribute(string randomStr, string otherStatful)
};
- IShamWow processor = ShamWowEngine.GetFactory().Create(model);
+ IShamWow processor = ShamWowEngine.GetFactory().Create(model, Constants.ScrubMode.Marked);
processor.Scrub();
var cleanedData = (StatefulTest)processor.CleanData();
@@ -55,7 +55,7 @@ public void TestComplexStatefulModel(string randomStr, string anotherRandomStr,
};
- ShamWow.Processor.IShamWow processor = ShamWow.Processor.ShamWowEngine.GetFactory().Create(model);
+ ShamWow.Processor.IShamWow processor = ShamWow.Processor.ShamWowEngine.GetFactory().Create(model, Constants.ScrubMode.Marked);
processor.Scrub();
var cleanedData = (ComplexStateTest)processor.CleanData();
@@ -108,7 +108,7 @@ public void FullModelTest(string randomStr, string anotherRandomStr, int num, in
}
};
- ShamWow.Processor.IShamWow processor = ShamWow.Processor.ShamWowEngine.GetFactory().Create(model);
+ ShamWow.Processor.IShamWow processor = ShamWow.Processor.ShamWowEngine.GetFactory().Create(model, Constants.ScrubMode.Marked);
processor.Scrub();
var cleanedData = (FullModelTest)processor.CleanData();
@@ -143,7 +143,7 @@ public void GivenString_ScrubToNumber_SaveState()
IdTwo = IdTwo
};
- IShamWow processor = ShamWowEngine.GetFactory().Create(model);
+ IShamWow processor = ShamWowEngine.GetFactory().Create(model, Constants.ScrubMode.Marked);
processor.Scrub();
var cleanedData = (StatefulStringIdTest)processor.CleanData();
diff --git a/ShamWow/Processor/Factory.cs b/ShamWow/Processor/Factory.cs
index 5e1345c..72223ff 100644
--- a/ShamWow/Processor/Factory.cs
+++ b/ShamWow/Processor/Factory.cs
@@ -1,21 +1,22 @@
-using System;
+using ShamWow.Constants;
+using System;
namespace ShamWow.Processor
{
public class Factory
{
- private Func