CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
CommandBaseTests.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="CommandBaseTests.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>no summary</summary>
7//-----------------------------------------------------------------------
8using Csla;
10using UnitDriven;
12using System.Threading.Tasks;
13
14#if NUNIT
15using NUnit.Framework;
16using TestClass = NUnit.Framework.TestFixtureAttribute;
17using TestInitialize = NUnit.Framework.SetUpAttribute;
18using TestCleanup = NUnit.Framework.TearDownAttribute;
19using TestMethod = NUnit.Framework.TestAttribute;
20using TestSetup = NUnit.Framework.SetUpAttribute;
21#elif MSTEST
22using Microsoft.VisualStudio.TestTools.UnitTesting;
23#endif
24
26{
27 [TestClass]
29 {
30 private const string ExecutionResultInvalidMessage = "Execution result is not valid";
31 private const string Parameter = "test parameter";
32 private const string ExpectedExecutionResult = TestCommandBase.ExecutionSignal + Parameter;
33
34
35 [TestMethod]
36
38 {
39 var command = new TestCommandBase(Parameter);
40 var result = await DataPortal.ExecuteAsync<TestCommandBase>(command);
41 Assert.AreEqual(ExpectedExecutionResult, result.ExecutionResult, ExecutionResultInvalidMessage);
42 }
43 }
44}
Client side data portal used for making asynchronous data portal calls in .NET.
Definition: DataPortalT.cs:24
async Task< T > ExecuteAsync(T command)
Called by a factory method in a business class or by the UI to execute a command object.
Definition: DataPortalT.cs:600
async Task Asynch_Remote_call_wo_userState_passed_Results_parameters_passed_to_server_and_noException()