public Dictionary <DateTime, int[]> GetStatisticsSuccess(DateTime from, DateTime?to) { if (realBridge != null) { return(realBridge.GetStatisticsSuccess(from, to)); } return(null); }
public void UC_6_5_systemAdminStatistics_success() { systemOperations.logout(); systemOperations.loginSystemAdmin(); Dictionary <DateTime, int[]> statistics = systemOperations.GetStatisticsSuccess(DateTime.Today, null); systemOperations.doActionFromGuest(); Dictionary <DateTime, int[]> newStatistics = systemOperations.GetStatisticsSuccess(DateTime.Today, null); Assert.True(ValidateIndexUpBy(statistics[DateTime.Today], newStatistics[DateTime.Today], guestIndex, 1)); statistics = newStatistics; systemOperations.doActionFromUser(ownerTests.registeredUser); newStatistics = systemOperations.GetStatisticsSuccess(DateTime.Today, null); Assert.True(ValidateIndexUpBy(statistics[DateTime.Today], newStatistics[DateTime.Today], registeredIndex, 1)); statistics = newStatistics; systemOperations.doActionFromUser(ownerTests.manager1); systemOperations.doActionFromUser(ownerTests.manager2); newStatistics = systemOperations.GetStatisticsSuccess(DateTime.Today, null); Assert.True(ValidateIndexUpBy(statistics[DateTime.Today], newStatistics[DateTime.Today], managersIndex, 2)); statistics = newStatistics; systemOperations.doActionFromUser(ownerTests.store2Owner); systemOperations.doActionFromUser(ownerTests.store1AdditionalOwner); systemOperations.doActionFromUser(ownerTests.loggedInStore1Owner); newStatistics = systemOperations.GetStatisticsSuccess(DateTime.Today, null); Assert.True(ValidateIndexUpBy(statistics[DateTime.Today], newStatistics[DateTime.Today], ownersIndex, 3)); systemOperations.logout(); systemOperations.loginSystemAdmin(); statistics = newStatistics; newStatistics = systemOperations.GetStatisticsSuccess(DateTime.Today, null); Assert.True(ValidateIndexUpBy(statistics[DateTime.Today], newStatistics[DateTime.Today], adminsIndex, 1)); }