-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support of sequential When in AAA.
- Loading branch information
1 parent
1d3f716
commit 6f6b6c4
Showing
8 changed files
with
270 additions
and
52 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,29 @@ | ||
// <copyright file="MyComponent.cs" company="Heleonix - Hennadii Lutsyshyn"> | ||
// Copyright (c) 2018-present Heleonix - Hennadii Lutsyshyn. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the repository root for full license information. | ||
// </copyright> | ||
|
||
namespace Heleonix.Testing.NUnit.Tests.Aaa.Examples | ||
{ | ||
/// <summary> | ||
/// Dummy component. | ||
/// </summary> | ||
public static class MyComponent | ||
{ | ||
/// <summary> | ||
/// Dummy member. | ||
/// </summary> | ||
public static void Member1() | ||
{ | ||
// Dummy member. | ||
} | ||
|
||
/// <summary> | ||
/// Dummy member. | ||
/// </summary> | ||
public static void Member2() | ||
{ | ||
// Dummy member. | ||
} | ||
} | ||
} |
131 changes: 131 additions & 0 deletions
131
Heleonix.Testing.NUnit.Tests/Aaa/Examples/MyComponentTests.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,131 @@ | ||
// <copyright file="MyComponentTests.cs" company="Heleonix - Hennadii Lutsyshyn"> | ||
// Copyright (c) 2018-present Heleonix - Hennadii Lutsyshyn. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the repository root for full license information. | ||
// </copyright> | ||
|
||
namespace Heleonix.Testing.NUnit.Tests.Aaa.Examples | ||
{ | ||
using Heleonix.Testing.NUnit.Aaa; | ||
using static Heleonix.Testing.NUnit.Aaa.AaaSpec; | ||
|
||
/// <summary> | ||
/// Tests the <see cref="MyComponent"/>. | ||
/// </summary> | ||
[ComponentTest(Type = typeof(MyComponent))] | ||
public static class MyComponentTests | ||
{ | ||
/// <summary> | ||
/// Tests the <see cref="MyComponent.Member1"/>. | ||
/// </summary> | ||
[MemberTest(Name = nameof(MyComponent.Member1))] | ||
public static void Member1() | ||
{ | ||
Arrange(() => | ||
{ | ||
}); | ||
|
||
Act(() => | ||
{ | ||
}); | ||
|
||
Teardown(() => | ||
{ | ||
}); | ||
|
||
When("the condition #1 is true", () => | ||
{ | ||
Arrange(() => | ||
{ | ||
}); | ||
|
||
Act(() => | ||
{ | ||
}); | ||
|
||
Teardown(() => | ||
{ | ||
}); | ||
|
||
Should("lead to the result #1", () => | ||
{ | ||
}); | ||
}); | ||
|
||
When("the condition #2 is true", () => | ||
{ | ||
Arrange(() => | ||
{ | ||
}); | ||
|
||
Act(() => | ||
{ | ||
}); | ||
|
||
Teardown(() => | ||
{ | ||
}); | ||
|
||
Should("lead to the result #2", () => | ||
{ | ||
}); | ||
}); | ||
} | ||
|
||
/// <summary> | ||
/// Tests the <see cref="MyComponent.Member2"/>. | ||
/// </summary> | ||
[MemberTest(Name = nameof(MyComponent.Member2))] | ||
public static void Member2() | ||
{ | ||
Arrange(() => | ||
{ | ||
}); | ||
|
||
Act(() => | ||
{ | ||
}); | ||
|
||
Teardown(() => | ||
{ | ||
}); | ||
|
||
When("the action #1 is executed", () => | ||
{ | ||
Arrange(() => | ||
{ | ||
}); | ||
|
||
Act(() => | ||
{ | ||
}); | ||
|
||
Teardown(() => | ||
{ | ||
}); | ||
|
||
Should("lead to the result #1", () => | ||
{ | ||
}); | ||
|
||
And("the condition #1 is true", () => | ||
{ | ||
Arrange(() => | ||
{ | ||
}); | ||
|
||
Act(() => | ||
{ | ||
}); | ||
|
||
Teardown(() => | ||
{ | ||
}); | ||
|
||
Should("lead to the result #2", () => | ||
{ | ||
}); | ||
}); | ||
}); | ||
} | ||
} | ||
} |
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