public StackHashSyncProgress(int productId, int fileId, int eventId, String eventTypeName, int cabId, StackHashSyncPhase syncPhase) { m_ProductId = productId; m_FileId = fileId; m_EventId = eventId; m_CabId = cabId; m_EventTypeName = eventTypeName; m_SyncPhase = syncPhase; }
public void GetSetSyncProgressNTimes() { m_Index = new SqlErrorIndex(StackHashSqlConfiguration.Default, SqlUtils.UnitTestDatabase, m_RootCabFolder); m_Index.DeleteIndex(); m_Index.Activate(); int numTimes = 100; Random rand = new Random(1); for (int i = 0; i < numTimes; i++) { StackHashSyncPhase phase = (StackHashSyncPhase)rand.Next(0, 4); StackHashSyncProgress syncProgress = new StackHashSyncProgress(1 + i, 2 + i, 3 + i, "EventTypeName" + i.ToString(), 4 + i, phase); m_Index.SyncProgress = syncProgress; StackHashSyncProgress newProgress = m_Index.SyncProgress; Assert.AreEqual(0, newProgress.CompareTo(syncProgress)); } }