using System;
using NUnit.Framework;
namespace NUnitPoc
{
[TestFixture,Category("Optional Category Attribute"), Description("Optional Description")]
public class NUnitPocTests
{
// Code run once before all tests
[OneTimeSetUp]
public void OneTimeInitialization()
{
}
// Code that is run once after all tests
[OneTimeTearDown]
public void OneTimeCleanup()
{
}
// Code that is run once before each test
[SetUp]
public void Initialize()
{
}
// Code that is run once after each test
[TearDown]
public void Cleanup()
{
}
//Example Test
[Test]
public void ExampleTest()
{
//Arrange.
int expected = 1;
//Act
int? actual = MethodToTest();
//Assert
Assert.IsTrue(expected == actual, "expected == actual");
//Other example assets
Assert.AreEqual(expected, actual);
Assert.IsFalse(false);
Assert.IsEmpty(string.Empty);
//Assert.Fail("Explicitly Fail");
Assert.Throws<NotImplementedException>(NotImplementedMethod);
}
[Test]
public void ParameterizedTest([Values(1, 2, 3)] int value)
{
//Do some testing here
Console.WriteLine(value);
}
private int MethodToTest()
{
return 1;
}
private void NotImplementedMethod()
{
throw new NotImplementedException();
}
}
}
Cypressio cheat sheet helps in using right code examples for the automation frameworks. This cheat sheet is created for the participants of online training platform:
https://engineers-hub.teachable.com/p/cypressio
Key Points on ISTQB Test Automation Engineering sourced from:
https://engineers-hub.teachable.com/p/istqb-advanced-level-test-automation-engineer-professional-training-with-q-a
Fundamental Cloud Concepts for AWS based on the course by David Tucker: https://app.pluralsight.com/library/courses/fundamental-cloud-concepts-aws/table-of-contents
Created By
https://github.com/GregFinzer
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by GregFinzer