public void TestVerify_OneMatchingParts() { var hardwareID = HardwareIdentifier.ForCurrentComputer(); var splitted = hardwareID.Split('-'); var otherID = string.Format("1234567890-0987654321-3010203045-" + splitted[3] + "-DummycheckSum"); Assert.IsFalse(HardwareIdentifier.IsValidForCurrentComputer(otherID)); }
public void TestVerify_ThreeMatchingParts() { var hardwareID = HardwareIdentifier.ForCurrentComputer(); var splitted = hardwareID.Split('-'); var otherID = string.Format("12345678-" + splitted[1] + "-" + splitted[2] + "-" + splitted[3] + "-DummycheckSum"); Assert.IsTrue(HardwareIdentifier.IsValidForCurrentComputer(otherID)); }
public void TestVerify_ZeroMatchingParts() => Assert.IsFalse(HardwareIdentifier.IsValidForCurrentComputer("12345678-09876543-09876543-12345678-0987"));
public void Test_verify() { var hardwareID = HardwareIdentifier.ForCurrentComputer(); Assert.IsTrue(HardwareIdentifier.IsValidForCurrentComputer(hardwareID)); }
public void Test_verify_crap_string() => Assert.IsFalse(HardwareIdentifier.IsValidForCurrentComputer("dsfdsaf<df"));
public void Test_verify_empty_string() { Assert.IsFalse(HardwareIdentifier.IsValidForCurrentComputer("")); }
public void Test_verify_null() => TestHelper.AssertException <ArgumentNullException>(() => HardwareIdentifier.IsValidForCurrentComputer(null));