> **Experimental**
>
> `@aws-cdk/integ-tests-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# ActualResult

Represents the "actual" results to compare.

Obtainable from: ActualResult.fromAwsApiCall, ActualResult.fromCustomResource
Used as argument in: [IDeployAssert.expect](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_integ-tests-alpha.IDeployAssert.html#expect)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/assertions/common.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/integ-tests-alpha/lib/assertions/common.ts#L7)

## Example

TypeScript:

```ts
declare const myCustomResource: CustomResource;
declare const stack: Stack;
declare const app: App;

const integ = new IntegTest(app, 'Integ', { testCases: [stack] });
integ.assertions.expect(
  'CustomAssertion',
  ExpectedResult.objectLike({ foo: 'bar' }),
  ActualResult.fromCustomResource(myCustomResource, 'data'),
);
```

Python:

```python
# my_custom_resource: CustomResource
# stack: Stack
# app: App

integ = IntegTest(app, "Integ", test_cases=[stack])
integ.assertions.expect("CustomAssertion",
    ExpectedResult.object_like({"foo": "bar"}),
    ActualResult.from_custom_resource(my_custom_resource, "data"))
```

Java:

```java
CustomResource myCustomResource;
Stack stack;
App app;

IntegTest integ = IntegTest.Builder.create(app, "Integ").testCases(List.of(stack)).build();
integ.assertions.expect("CustomAssertion", ExpectedResult.objectLike(Map.of("foo", "bar")), ActualResult.fromCustomResource(myCustomResource, "data"));
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.IntegTests.Alpha
CustomResource myCustomResource;
Stack stack;
App app;

var integ = new IntegTest(app, "Integ", new IntegTestProps { TestCases = new [] { stack } });
integ.Assertions.Expect("CustomAssertion", ExpectedResult.ObjectLike(new Dictionary<string, object> { { "foo", "bar" } }), ActualResult.FromCustomResource(myCustomResource, "data"));
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkintegtestsalpha/v2
var myCustomResource CustomResource
var stack Stack
var app App

integ := awscdkintegtestsalpha.NewIntegTest(app, jsii.String("Integ"), &IntegTestProps{
	TestCases: []Stack{
		stack,
	},
})
integ.Assertions.Expect(jsii.String("CustomAssertion"), awscdkintegtestsalpha.ExpectedResult_ObjectLike(map[string]interface{}{
	"foo": jsii.String("bar"),
}), awscdkintegtestsalpha.ActualResult_FromCustomResource(myCustomResource, jsii.String("data")))
```

## Initializer

TypeScript:

```ts
new ActualResult()
```

Python:

```python
ActualResult()
```

Java:

```java
new ActualResult()
```

C# / .NET:

```csharp
new ActualResult()
```

Golang:

```go
NewActualResult()
```

## Properties

- `result`: string — The actual results as a string.

## Methods

- `fromAwsApiCall(query: IApiCall, attribute: string): ActualResult // chainable` (static) — Get the actual results from a AwsApiCall.

- `fromCustomResource(customResource: CustomResource, attribute: string): ActualResult // chainable` (static) — Get the actual results from a CustomResource.
