override public void Run() { // 61 characters should be trimmed to 60 + _NNN for duplicates string name = "1234567890123456789012345678901234567890123456789012345678901"; RtpSessionPC[] pcs = new RtpSessionPC[10]; // Test trimming RtpSessionPC pc = new RtpSessionPC(name); if (pc.Name.Length != 60) { throw new TestCaseException("Unexpected pc length"); } pcs[0] = pc; // Create duplicates for (int i = 1; i < pcs.Length; i++) { pcs[i] = new RtpSessionPC(name); } // Validate duplicates for (int i = 1; i < pcs.Length; i++) { string iName = ((RtpSessionPC)pcs[i]).Name; if (iName.Length != 62) { throw new TestCaseException("Unexpected pc length"); } if (!iName.EndsWith(i.ToString())) { throw new TestCaseException("Unexpected pc name"); } } // Dispose all for (int i = 0; i < pcs.Length; i++) { ((RtpSessionPC)pcs[i]).Dispose(); } }
override public void Run() { // 61 characters should be trimmed to 60 + _NNN for duplicates string name = "1234567890123456789012345678901234567890123456789012345678901"; RtpSessionPC[] pcs = new RtpSessionPC[10]; // Test trimming RtpSessionPC pc = new RtpSessionPC(name); if(pc.Name.Length != 60){throw new TestCaseException("Unexpected pc length");} pcs[0] = pc; // Create duplicates for(int i = 1; i < pcs.Length; i++) { pcs[i] = new RtpSessionPC(name); } // Validate duplicates for(int i = 1; i < pcs.Length; i++) { string iName = ((RtpSessionPC)pcs[i]).Name; if(iName.Length != 62){throw new TestCaseException("Unexpected pc length");} if(!iName.EndsWith(i.ToString())){throw new TestCaseException("Unexpected pc name");} } // Dispose all for(int i = 0; i < pcs.Length; i++) { ((RtpSessionPC)pcs[i]).Dispose(); } }