thygesteffensen / PowerAutomateMockUp

Skeleton to run Power Automate Flows from their JSON descriptions.
MIT License
7 stars 1 forks source link

Overwrite ContainsKey to also include children dicts for easier use #48

Closed github-actions[bot] closed 3 years ago

github-actions[bot] commented 3 years ago

Overwrite ContainsKey to also include children dicts for easier use

https://github.com/thygesteffensen/PowerAutomateMockUp/blob/cb9557335375c289f23f454d948de9edf7bf7253/Test/FullFlowTestV2.cs#L58

            FlowAssert.AssertActionWasTriggered(flowResult, actionName);
            FlowAssert.AssertFlowParameters(flowResult, actionName,
                // TODO: Overwrite ContainsKey to also include children dicts for easier use    
                x => x.ContainsKey("parameters/NotificationEmailDefinition"),
                x => x["parameters/NotificationEmailDefinition/notificationSubject"]
                    .Equals(new ValueContainer("A new Account have been added")),
                x => x["parameters/NotificationEmailDefinition/notificationSubject"].GetValue<string>() ==
                     "A new Account have been added");

            Assert.IsTrue(flowResult.ActionStates.ContainsKey(actionName), "Action is expected to be triggered.");
            Assert.NotNull(flowResult.ActionStates[actionName].ActionInput?["parameters"], "Action input is expected.");

057a1a0c33beda207c1a2e34743c462029df4a98

github-actions[bot] commented 3 years ago

Closed in d6301f2ccd5c3d400ddf0c75dc0ca8cf55277f24