コード例 #1
0
        public void PerfitWorksWithSmallInstanceName()
        {
            var handler = new DummyHandle("dummy", "SmallString");

            string withFalse = handler.GetInstanceNameCheat(false);
            string withTrue  = handler.GetInstanceNameCheat(true);

            Assert.True(withFalse.Length < 127, withFalse.Length.ToString());
            Assert.True(withTrue.Length < 127, withTrue.Length.ToString());
        }
コード例 #2
0
        public void PerfitWillNeverEverCreatingAnInstanceNameBiggerThan116Chars()
        {
            var largeString = string.Join("-", Enumerable.Range(0, 128).Select(i => i.ToString()));
            var handler     = new DummyHandle("dummy", largeString);

            string withFalse = handler.GetInstanceNameCheat(false);
            string withTrue  = handler.GetInstanceNameCheat(true);

            Assert.True(withFalse.Length < 127, withFalse.Length.ToString());
            Assert.True(withTrue.Length < 127, withTrue.Length.ToString());
        }