コード例 #1
0
        public void ListUsers_CanCallPhpClass()
        {
            // Setup
            var sut = new LanguageForgeProxy();

            // Exercise
            string output = sut.ListUsers();

            // Verify
            var result = JsonConvert.DeserializeObject<Dictionary<string, Object>>(output);
            Assert.That(output, Is.Not.Empty);
            Assert.That(result["count"], Is.GreaterThan(0));
        }
コード例 #2
0
        public void UpdateCustomFieldViews_ReturnsProjectId()
        {
            // Setup
            var customFieldSpecs = new List<CustomFieldSpec>();
            customFieldSpecs.Add(new CustomFieldSpec("customField_entry_testMultiPara", "OwningAtom"));
            customFieldSpecs.Add(new CustomFieldSpec("customField_examples_testOptionList", "ReferenceAtom"));
            var sut = new LanguageForgeProxy();

            // Exercise
            string output = sut.UpdateCustomFieldViews("TestCode1", customFieldSpecs, true);

            // Verify
            var result = JsonConvert.DeserializeObject<string>(output);
            Assert.That(output, Is.Not.Empty);
            Assert.That(output, Is.Not.EqualTo("false"));
            Assert.That(result, Is.Not.Empty);
        }