private bool AssertNotFoundInterfaceInfosEqual(InterfaceDeficitInfo actualDeficitInfo, InterfaceDeficitInfo expectedDeficitInfo) { return(actualDeficitInfo.ProblemInterface.SameIdentityAs(expectedDeficitInfo.ProblemInterface) && actualDeficitInfo.Deficit == expectedDeficitInfo.Deficit && UtilsAssert.CollectionsEqual(expectedDeficitInfo.RequiredByComponents, actualDeficitInfo.RequiredByComponents)); }
private void AssertComponentsEqual(PCComponent savedComp, PCComponent loadedComp) { Assert.That(loadedComp, Is.Not.Null); Assert.That(loadedComp.AveragePrice, Is.EqualTo(savedComp.AveragePrice)); Assert.That(loadedComp.Name, Is.EqualTo(savedComp.Name)); Assert.That(UtilsAssert.CollectionsEqual(savedComp.ContainedSlots, loadedComp.ContainedSlots)); Assert.That(UtilsAssert.CollectionsEqual(savedComp.PlugSlots, loadedComp.PlugSlots)); Assert.That(UtilsAssert.CollectionsEqual(savedComp.ContainedComponents, loadedComp.ContainedComponents)); Assert.That(UtilsAssert.CollectionsEqual(savedComp.CharacteristicValues, loadedComp.CharacteristicValues, CompareCharacteristicValues)); }
private static void AssertResultsEqual(PagedResult <ComponentInterface> expectedResult, PagedResult <ComponentInterfaceVO> actualResult) { Assert.That(expectedResult.CountTotal == actualResult.CountTotal); Assert.That(expectedResult.PagingParameters.PageNumber == actualResult.PagingParameters.PageNumber); Assert.That(expectedResult.PagingParameters.PageSize == actualResult.PagingParameters.PageSize); Assert.That(UtilsAssert.CollectionsEqual( new ReadOnlyCollection <ComponentInterface>(expectedResult.Items), new ReadOnlyCollection <ComponentInterfaceVO>(actualResult.Items), (a, b) => a.Name == b.Name)); }
private void AssertNotFoundInterfaceInfosEqual(List <InterfaceDeficitInfo> actualList, List <InterfaceDeficitInfo> expectedList) { Assert.That(UtilsAssert.CollectionsEqual(expectedList, actualList, AssertNotFoundInterfaceInfosEqual)); }