internal static void Modify_DataChanged(DataHolderSample data) { DataHolderSample dupe = Tools.Duplicator.Copy(data); Tools.Asserter.Is(true, Tools.Mutator.Modify(data)); Tools.Asserter.ValuesNotEqual(dupe, data); }
internal static void Tools_IntegrationWorks() { DataHolderSample original = Tools.Randomizer.Create <DataHolderSample>(); DataHolderSample variant = Tools.Mutator.Variant(original); DataHolderSample dupe = Tools.Duplicator.Copy(original); Tools.Asserter.ValuesEqual(original, dupe); Tools.Asserter.ValuesNotEqual(original, variant); Fake <DataHolderSample> faked = Tools.Faker.Mock <DataHolderSample>(); faked.Setup( m => m.HasNested(dupe), Behavior.Returns(true, Times.Once)); Tools.Asserter.Is(true, faked.Dummy.HasNested(original), "Value equality did not work for args."); faked.VerifyAll(Times.Once); }
/// <summary>For testing.</summary> internal static void Mutate(DataHolderSample data) { data.NestedValue = null; }