Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,19 @@ public void Test006_Should_Query_Global_Field()

[TestMethod]
[DoNotParallelize]
public async System.Threading.Tasks.Task Test007_Should_Update_Async_Global_Field()
public void Test006a_Should_Query_Global_Field_With_ApiVersion()
{
ContentstackResponse response = _stack.GlobalField(apiVersion: "3.2").Query().Find();
GlobalFieldsModel globalField = response.OpenTResponse<GlobalFieldsModel>();
Assert.IsNotNull(response);
Assert.IsNotNull(globalField);
Assert.IsNotNull(globalField.Modellings);
Assert.AreEqual(1, globalField.Modellings.Count);
}

[TestMethod]
[DoNotParallelize]
public async System.Threading.Tasks.Task Test007_Should_Query_Async_Global_Field()
{
ContentstackResponse response = await _stack.GlobalField().Query().FindAsync();
GlobalFieldsModel globalField = response.OpenTResponse<GlobalFieldsModel>();
Expand All @@ -116,5 +128,17 @@ public async System.Threading.Tasks.Task Test007_Should_Update_Async_Global_Fiel
Assert.IsNotNull(globalField.Modellings);
Assert.AreEqual(1, globalField.Modellings.Count);
}

[TestMethod]
[DoNotParallelize]
public async System.Threading.Tasks.Task Test007a_Should_Query_Async_Global_Field_With_ApiVersion()
{
ContentstackResponse response = await _stack.GlobalField(apiVersion: "3.2").Query().FindAsync();
GlobalFieldsModel globalField = response.OpenTResponse<GlobalFieldsModel>();
Assert.IsNotNull(response);
Assert.IsNotNull(globalField);
Assert.IsNotNull(globalField.Modellings);
Assert.AreEqual(1, globalField.Modellings.Count);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using AutoFixture;
using Contentstack.Management.Core.Models;
Expand Down Expand Up @@ -239,6 +240,8 @@ public void Test007_Should_Query_Nested_Global_Fields()
Assert.AreEqual("nested_global_field_test", nestedGlobalField.Uid);
}



[TestMethod]
[DoNotParallelize]
public void Test009_Should_Delete_Referenced_Global_Field()
Expand All @@ -259,6 +262,5 @@ public void Test008_Should_Delete_Nested_Global_Field()
Assert.IsNotNull(response);
}


}
}
Loading