Ejemplo n.º 1
0
        public void Scope_TryAdd_RealValues_Test(string expected, string origin, params string[] values)
        {
            var test = new ScopeTester();

            test.Scope.Add(origin.ToString());
            Debug.WriteLine(test.ToString());

            QQConnectScopes.TryAdd(test.Scope, values);
            Debug.WriteLine(test.ToString());

            Assert.Equal(expected, test.ToString());
        }
Ejemplo n.º 2
0
        public void Scope_TryAdd_One_Test()
        {
            var test = new ScopeTester();

            Assert.Empty(test.Scope);

            test.Scope.Add("1");
            Assert.Equal("1", test.ToString());

            QQConnectScopes.TryAdd(test.Scope, "2".Split(","));
            Assert.Equal("1,2", test.ToString());

            QQConnectScopes.TryAdd(test.Scope, "3,4".Split(","));
            Assert.Equal("1,2,3,4", test.ToString());

            QQConnectScopes.TryAdd(test.Scope, "2,3,5,6".Split(","));
            Assert.Equal("1,2,3,4,5,6", test.ToString());
        }