public void CompareWithUnequalObjects() { var proposal1 = new DatasetActivationProposal { Endpoint = EndpointIdExtensions.CreateEndpointIdForCurrentProcess(), IsAvailable = true, ActivationTime = new TimeSpan(50), TransferTime = new TimeSpan(50), PercentageOfAvailableDisk = 50, PercentageOfMaximumMemory = 50, PercentageOfPhysicalMemory = 50, }; var proposal2 = new DatasetActivationProposal { Endpoint = EndpointIdExtensions.CreateEndpointIdForCurrentProcess(), IsAvailable = true, ActivationTime = new TimeSpan(500), TransferTime = new TimeSpan(500), PercentageOfAvailableDisk = 50, PercentageOfMaximumMemory = 50, PercentageOfPhysicalMemory = 50, }; var comparer = new DatasetActivationProposalComparer(); Assert.AreEqual(-1, comparer.Compare(proposal1, proposal2)); }
public void CompareWithBothObjectsNull() { var comparer = new DatasetActivationProposalComparer(); Assert.Throws <ArgumentNullException>(() => comparer.Compare(null, null)); }