public void HasNoProtocol() { var dep = new NoDependencies(); var fp1 = dep.Fingerprint; var proto = fp1.Protocol; proto.Should().BeNull(); }
public void NoDependenciesMakesEqualFingerprints() { var dep1 = new NoDependencies(); var dep2 = new NoDependencies(); var fp1 = dep1.Fingerprint; var fp2 = dep2.Fingerprint; fp1.Should().Be(fp2); fp2.Should().Be(fp1); fp1.Equals(fp2).Should().BeTrue(); }
/// <summary> /// Creates the fingerprint by its deserialized protocol data /// </summary> /// <param name="proto">The deserialized protocol data</param> public CombinedFingerprint(CombinedFingerprintProtocol proto) { fingerprints = new HashSet <IDependencyFingerprint>(); var noDeps = new NoDependencies(); var noDepsFp = noDeps.Fingerprint; foreach (var childProtocol in proto.Items) { var childDependencyFingerprint = childProtocol != null?childProtocol.CreateFingerprint() : noDepsFp; fingerprints.Add(childDependencyFingerprint); } }