-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASKSCLOUD-682] - Deployed new 22.12 version.
- Loading branch information
1 parent
d1bb3fe
commit 3073885
Showing
12 changed files
with
323 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
Aspose.Tasks.Cloud.Sdk.Tests/Tasks/TestPrimaveraProperties.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
|
||
// -------------------------------------------------------------------------------------------------------------------- | ||
// <copyright company="Aspose" file="TestPrimaveraProperties.cs"> | ||
// Copyright (c) 2022 Aspose.Tasks for Cloud | ||
// </copyright> | ||
// <summary> | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
// </summary> | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Net; | ||
using Aspose.Tasks.Cloud.Sdk.Model; | ||
using Aspose.Tasks.Cloud.Sdk.Model.Requests; | ||
using Aspose.Tasks.Cloud.Sdk.Tests.Base; | ||
using NUnit.Framework; | ||
using Task = System.Threading.Tasks.Task; | ||
|
||
namespace Aspose.Tasks.Cloud.Sdk.Tests.Tasks | ||
{ | ||
[TestFixture] | ||
public class TestPrimaveraProperties : BaseTestContext | ||
{ | ||
[Test] | ||
public async Task TestGetPrimaveraTaskProperties() | ||
{ | ||
var remoteName = await UploadFileToStorageAsync("p6_multiproject.xml"); | ||
|
||
var response = await TasksApi.GetPrimaveraTaskPropertiesAsync(new GetPrimaveraTaskPropertiesRequest | ||
{ | ||
Name = remoteName, | ||
Folder = this.DataFolder, | ||
TaskUid = 1 | ||
}); | ||
|
||
Assert.AreEqual((int)HttpStatusCode.OK, response.Code); | ||
Assert.IsNotNull(response.PrimaveraProperties); | ||
|
||
var entity = response.PrimaveraProperties; | ||
Assert.AreEqual(0, (int)entity.SequenceNumber); | ||
Assert.AreEqual("A1040", entity.ActivityId); | ||
Assert.AreEqual(new DateTime(2000, 10, 12, 8, 0, 0), entity.RemainingEarlyStart); | ||
Assert.AreEqual(new DateTime(2000, 10, 12, 17, 0, 0), entity.RemainingEarlyFinish); | ||
Assert.AreEqual(new DateTime(2000, 10, 12, 8, 0, 0), entity.RemainingLateStart); | ||
Assert.AreEqual(new DateTime(2000, 10, 12, 17, 0, 0), entity.RemainingLateFinish); | ||
Assert.AreEqual("Fixed Units", entity.RawDurationType); | ||
Assert.AreEqual("Task Dependent", entity.RawActivityType); | ||
Assert.AreEqual("Units", entity.RawCompletePercentType); | ||
Assert.AreEqual("Not Started", entity.RawStatus); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
using System; | ||
|
||
namespace Aspose.Tasks.Cloud.Sdk.Model | ||
{ | ||
/// <summary> | ||
/// Represents Primavera-specific properties for a task read from Primavera format (XER of P6XML). | ||
/// </summary> | ||
public class PrimaveraTaskProperties | ||
{ | ||
/// <summary> | ||
/// The sequence number of the WBS item (summary tasks). It is used to sort summary tasks in Primavera. | ||
/// </summary> | ||
/// <remarks> | ||
/// Applicable to WBS items (summary tasks). | ||
/// </remarks> | ||
public int SequenceNumber { get; set; } | ||
|
||
/// <summary> | ||
/// Activity id field - a task's unique identifier used by Primavera. | ||
/// </summary> | ||
/// <remarks> | ||
/// Applicable only to activities (non-summary tasks). | ||
/// </remarks> | ||
public string ActivityId { get; set; } | ||
|
||
/// <summary> | ||
/// Remaining early finish date - the date when the remaining work for the activity is scheduled to be finished. | ||
/// </summary> | ||
public DateTime RemainingEarlyFinish { get; set; } | ||
|
||
/// <summary> | ||
/// Remaining early start date - the date when the remaining work for the activity is scheduled to begin. | ||
/// </summary> | ||
public DateTime RemainingEarlyStart { get; set; } | ||
|
||
/// <summary> | ||
/// Remaining late start date. | ||
/// </summary> | ||
public DateTime RemainingLateStart { get; set; } | ||
|
||
/// <summary> | ||
/// Remaining late finish date. | ||
/// </summary> | ||
public DateTime RemainingLateFinish { get; set; } | ||
|
||
/// <summary> | ||
/// Raw text representation (as in source file) of 'Duration Type' field of the activity. | ||
/// </summary> | ||
/// <remarks> | ||
/// Applicable only to activities (non-summary tasks). | ||
/// </remarks> | ||
public string RawDurationType { get; set; } | ||
|
||
/// <summary> | ||
/// Raw text representation (as in source file) of 'Activity Type' field of the activity. | ||
/// </summary> | ||
/// <remarks> | ||
/// Applicable only to activities (non-summary tasks). | ||
/// </remarks> | ||
public string RawActivityType { get; set; } | ||
|
||
/// <summary> | ||
/// Raw text representation (as in source file) of '% Complete Type' field of the activity. | ||
/// </summary> | ||
/// <remarks> | ||
/// Applicable only to activities (non-summary tasks). | ||
/// </remarks> | ||
public string RawCompletePercentType { get; set; } | ||
|
||
/// <summary> | ||
/// Raw text representation (as in source file) of 'Status' field of the activity. | ||
/// </summary> | ||
/// <remarks> | ||
/// Applicable only to activities (non-summary tasks). | ||
/// </remarks> | ||
public string RawStatus { get; set; } | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Aspose.Tasks.Cloud.Sdk/Model/PrimaveraTaskPropertiesResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace Aspose.Tasks.Cloud.Sdk.Model | ||
{ | ||
/// <summary> | ||
/// PrimaveraProperties response. | ||
/// </summary> | ||
public class PrimaveraTaskPropertiesResponse : AsposeResponse | ||
{ | ||
/// <summary> | ||
/// PrimaveraTaskProperties DTO | ||
/// </summary> | ||
public PrimaveraTaskProperties PrimaveraProperties { get; set; } | ||
} | ||
} |
Oops, something went wrong.