[Description("Xamarin.Forms.ActivityIndicator Tests")]
public class ActivityIndicatorTests
{
- private static ActivityIndicator _activityIndicator;
+ private ActivityIndicator _activityIndicator;
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
Console.WriteLine("ActivityIndicatorTests --------------- Setup()");
_activityIndicator = new ActivityIndicator();
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Console.WriteLine("ActivityIndicatorTests --------------- TearDown()");
}
[Description("Xamarin.Forms.Animation Tests")]
public class AnimationTests
{
- private static Animation animation;
+ private Animation animation;
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
animation = new Animation();
Console.WriteLine("TSAnimationTests --------------- Setup()");
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
animation = null;
Console.WriteLine("TSAnimationTests --------------- TearDown()");
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Arindom Kumar Chanda Sajal, arindom.ch@samsung.com")]
[Property("COVPARAM", "")]
- public static void Animation_INIT()
+ public void Animation_INIT()
{
/*TEST CODE*/
Assert.IsNotNull(animation, "Instance of Animation is null");
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Arindom Kumar Chanda Sajal, arindom.ch@samsung.com")]
[Property("COVPARAM", "Action<double>, Double, Double, Easing, Action")]
- public static void Animation_INIT_WITH_ACTION()
+ public void Animation_INIT_WITH_ACTION()
{
/*TEST CODE*/
animation = new Animation(null, 0.3, 0.9, null, null);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MCST")]
[Property("AUTHOR", "Arindom Kumar Chanda Sajal, arindom.ch@samsung.com")]
- public static void Add_CHECK()
+ public void Add_CHECK()
{
/*TEST CODE*/
Animation animationNew = new Animation(null, 0.0, 0.7, null, null);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Arindom Kumar Chanda Sajal, arindom.ch@samsung.com")]
- public static void Commit_CHECK_RETURN_VALUE()
+ public void Commit_CHECK_RETURN_VALUE()
{
/*TEST CODE*/
try
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Arindom Kumar Chanda Sajal, arindom.ch@samsung.com")]
- public static void GetCallback_CHECK_RETURN_VALUE()
+ public void GetCallback_CHECK_RETURN_VALUE()
{
/*TEST CODE*/
Image image = new Image();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Arindom Kumar Chanda Sajal, arindom.ch@samsung.com")]
- public static void GetEnumerator_CHECK_RETURN_VALUE()
+ public void GetEnumerator_CHECK_RETURN_VALUE()
{
/*TEST CODE*/
Animation animationNew = new Animation(null, 0.0, 0.7, null, null);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Arindom Kumar Chanda Sajal, arindom.ch@samsung.com")]
- public static void Insert_CHECK_RETURN_VALUE()
+ public void Insert_CHECK_RETURN_VALUE()
{
/*TEST CODE*/
Animation animationNew = new Animation(null, 0.0, 0.7, null, null);
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Arindom Kumar Chanda Sajal, arindom.ch@samsung.com")]
[Property("COVPARAM", "Xamarin.Forms.Animation, double, double")]
- public static void WithConcurrent_CHECK_RETURN_VALUE()
+ public void WithConcurrent_CHECK_RETURN_VALUE()
{
/*TEST CODE*/
Animation animationNew = new Animation(null, 0.0, 0.7, null, null);
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Arindom Kumar Chanda Sajal, arindom.ch@samsung.com")]
[Property("COVPARAM", "System.Action<double>, double, double, Xamarin.Forms.Easing, double, double")]
- public static void WithConcurrent_CHECK_RETURN_VALUE_ACTION()
+ public void WithConcurrent_CHECK_RETURN_VALUE_ACTION()
{
/*TEST CODE*/
var animationNew = animation.WithConcurrent(null, 0.0, 0.7, null, 0.0, 0.7);
using NUnit.Framework;
using System.Threading.Tasks;
using System.Collections.Generic;
+using System.Threading;
namespace Xamarin.Forms.Core.UnitTests
{
}
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
Console.WriteLine("AnimationExtensionsTests --------------- Setup()");
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Console.WriteLine("AnimationExtensionsTests --------------- TearDown()");
}
[Property("CRITERIA", "MCST")]
[Property("COVPARAM", "IAnimatable, String, Action<double>, Double, Double, uint, uint, Easing, Action<double, bool>, Func<bool>")]
[Property("AUTHOR", "Abu Sina Md. Raju Chowdhury, asm.raju@samsung.com")]
- public async Task Animate_WITH_ACTION_DOUBLE_PARAM()
+ public void Animate_WITH_ACTION_DOUBLE_PARAM()
{
/* TEST CODE */
bool isRunning = false;
double a = 1.3;
AnimationExtensions.Animate(mMyTestIAnimatable, handle, v => a = v, 1.0, 20.0, 12, 250, Easing.BounceOut, null, null);
isRunning = AnimationExtensions.AnimationIsRunning(mMyTestIAnimatable, handle);
- await Task.Delay(5000);
+ Thread.Sleep(5000);
Assert.IsTrue(isRunning, "Animation should starts properly.");
}
[Property("CRITERIA", "MCST")]
[Property("COVPARAM", "IAnimatable, String, Action<double>, uint, uint, Easing, Action<double, bool>, Func<bool>")]
[Property("AUTHOR", "Abu Sina Md. Raju Chowdhury, asm.raju@samsung.com")]
- public async Task Animate_WITH_ACTION_PARAM()
+ public void Animate_WITH_ACTION_PARAM()
{
/* TEST CODE */
bool isRunning = false;
double a = 1.2;
AnimationExtensions.Animate(mMyTestIAnimatable, handle, v => a = v, 16, 200, Easing.BounceIn, (v, c) => image.Scale = 1, () => true);
isRunning = AnimationExtensions.AnimationIsRunning(mMyTestIAnimatable, handle);
- await Task.Delay(2000);
+ Thread.Sleep(2000);
Assert.IsTrue(isRunning, "Animation should starts properly.");
//Assert.IsTrue(false, "[NA] Need to check.");
}
[Property("CRITERIA", "MCST")]
[Property("COVPARAM", "IAnimatable, String, Animation, uint, uint, Easing, Action<double, bool>, Func<bool>")]
[Property("AUTHOR", "Abu Sina Md. Raju Chowdhury, asm.raju@samsung.com")]
- public async Task Animate_WITH_ANIMATION_PARAM()
+ public void Animate_WITH_ANIMATION_PARAM()
{
/* TEST CODE */
bool isRunning = false;
String handle = "new handle";
AnimationExtensions.Animate(mMyTestIAnimatable, handle, animation, 16, 200, Easing.BounceIn, (v, c) => image.Scale = 1, () => true);
isRunning = AnimationExtensions.AnimationIsRunning(mMyTestIAnimatable, handle);
- await Task.Delay(2000);
+ Thread.Sleep(2000);
Assert.IsTrue(isRunning, "Animation should starts properly.");
//Assert.IsTrue(false, "[NA] Need to check.");
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Abu Sina Md. Raju Chowdhury, asm.raju@samsung.com")]
- public async Task AnimationIsRunning_CHECK_RETURN()
+ public void AnimationIsRunning_CHECK_RETURN()
{
/* TEST CODE */
bool isRunning = false;
String handle = "new handle";
AnimationExtensions.Animate(mMyTestIAnimatable, handle, animation, 16, 250, Easing.CubicIn, null, null);
isRunning = AnimationExtensions.AnimationIsRunning(mMyTestIAnimatable, handle);
- await Task.Delay(2000);
+ Thread.Sleep(2000);
Assert.IsTrue(isRunning, "Return value should be true.");
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Abu Sina Md. Raju Chowdhury, asm.raju@samsung.com")]
- public async Task AbortAnimation_CHECK_RETURN()
+ public void AbortAnimation_CHECK_RETURN()
{
/* TEST CODE */
bool isRunning = false;
isRunning = AnimationExtensions.AnimationIsRunning(mMyTestIAnimatable, handle);
Assert.IsTrue(isRunning, "Animation should starts properly.");
abort = AnimationExtensions.AbortAnimation(mMyTestIAnimatable, handle);
- await Task.Delay(2000);
+ Thread.Sleep(2000);
Assert.IsTrue(abort, "Animation should stops properly.");
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MCST")]
[Property("AUTHOR", "Abu Sina Md. Raju Chowdhury, asm.raju@samsung.com")]
- public async Task Animate_TEMPLATE()
+ public void Animate_TEMPLATE()
{
/* TEST CODE */
bool isRunning = false;
double a = 1.2;
AnimationExtensions.Animate<Image>(mMyTestIAnimatable, handle, v => image = image, v => a = image.Scale, 16, 255, Easing.Linear, null, null);
isRunning = AnimationExtensions.AnimationIsRunning(mMyTestIAnimatable, handle);
- await Task.Delay(2000);
+ Thread.Sleep(2000);
Assert.IsTrue(isRunning, "Animation should starts properly.");
}
}
[TestFixture]
public class AppLinkEntryTests
{
- private static AppLinkEntry _appLinkEntry;
- private static string _appResourcePath = Program.Current.DirectoryInfo.Resource;
+ private AppLinkEntry _appLinkEntry;
+ private string _appResourcePath = Program.Current.DirectoryInfo.Resource;
[SetUp]
public void SetUp()
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Razin Farhan Hussain, razin.fh@samsung.com")]
- public static void AppLinkEntry_INIT()
+ public void AppLinkEntry_INIT()
{
/*TEST CODE*/
var appLinkEntry = new AppLinkEntry();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "Razin Farhan Hussain, razin.fh@samsung.com")]
- public static void AppLinkUri_READ_WRITE()
+ public void AppLinkUri_READ_WRITE()
{
/*TEST CODE*/
var uri = new Uri("http://foo.com");
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "Razin Farhan Hussain, razin.fh@samsung.com")]
- public static void Description_READ_WRITE()
+ public void Description_READ_WRITE()
{
/*TEST CODE*/
string str = "razin";
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "Razin Farhan Hussain, razin.fh@samsung.com")]
- public static void IsLinkActive_READ_WRITE()
+ public void IsLinkActive_READ_WRITE()
{
/*TEST CODE*/
_appLinkEntry.IsLinkActive = true;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "Razin Farhan Hussain, razin.fh@samsung.com")]
- public static void Thumbnail_READ_WRITE()
+ public void Thumbnail_READ_WRITE()
{
/*TEST CODE*/
ImageSource imgSource = ImageSource.FromFile(_appResourcePath + "TED/thumbnail/a.jpg");
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "Razin Farhan Hussain, razin.fh@samsung.com")]
- public static void Title_READ_WRITE()
+ public void Title_READ_WRITE()
{
/*TEST CODE*/
string title ="SRBD" ;
namespace Xamarin.Forms.Core.UnitTests
{
-
-
[TestFixture]
[Description("Xamarin.Forms.BindingCondition Tests")]
public class BindingConditionTests
{
- private static BindingCondition _bindingCondition;
+ private BindingCondition _bindingCondition;
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
Console.WriteLine("BindingConditionTests --------------- Setup()");
_bindingCondition = new BindingCondition();
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Console.WriteLine("BindingConditionTests --------------- TearDown()");
}
[Description("Xamarin.Forms.BindingTypeConverter Tests")]
class BindingTypeConverterTests
{
- private static BindingTypeConverter _bindingTypeConverter;
+ private BindingTypeConverter _bindingTypeConverter;
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
Console.WriteLine("BindingTypeConverterTests --------------- Setup()");
_bindingTypeConverter = new BindingTypeConverter();
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Console.WriteLine("BindingTypeConverterTests --------------- TearDown()");
}
Assert.IsInstanceOf<BindingTypeConverter>(bindingTypeConverter, "Instance should be BindingTypeConverter type.");
}
- //[Test]
- //[Category("P1")]
- //[Description("Returns a Boolean value that indicates whether this BindingTypeConverter can convert sourceType to Binding.")]
- //[Property("SPEC", "Xamarin.Forms.BindingTypeConverter.CanConvertFrom M")]
- //[Property("SPEC_URL", "-")]
- //[Property("CRITERIA", "MR")]
- //[Property("AUTHOR", "Md.Elme Focruzzaman Razi, ef.razi@samsung.com")]
- //public void CanConvertFrom_CHECK_RETURN()
- //{
- // /* TEST CODE */
-
- // bool canConvert= _bindingTypeConverter.CanConvertFrom(typeof(String));
- // Assert.IsTrue(canConvert,"Expected true but return false");
- //}
-
[Test]
[Category("P1")]
[Description("Converts a property path to a binding.")]
namespace Xamarin.Forms.Core.UnitTests
{
-
[TestFixture]
[Description("Xamarin.Forms.BoundsConstraint Tests")]
class BoundsConstraintTests
{
-
-
-
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
Console.WriteLine("BoundsConstraintTests --------------- Setup()");
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Console.WriteLine("BoundsConstraintTests --------------- TearDown()");
}
[Description("Xamarin.Forms.BoundsTypeConverter Tests")]
class BoundsTypeConverterTests
{
- private static BoundsTypeConverter _boundsTypeConverter;
+ private BoundsTypeConverter _boundsTypeConverter;
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
Console.WriteLine("BoundsTypeConverterTests --------------- Setup()");
_boundsTypeConverter = new BoundsTypeConverter();
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Console.WriteLine("BoundsTypeConverterTests --------------- TearDown()");
}
[Description("Xamarin.Forms.BoxView Tests")]
public class BoxViewTests
{
- private static BoxView _boxView;
+ private BoxView _boxView;
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
Console.WriteLine("BoxViewTests --------------- Setup()");
_boxView = new BoxView();
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Console.WriteLine("BoxViewTests --------------- TearDown()");
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Abu Sina Md. Raju Chowdhury, asm.raju@samsung.com")]
- public static void BoxView_INIT()
+ public void BoxView_INIT()
{
/* TEST CODE */
var boxView = new BoxView();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "Abu Sina Md. Raju Chowdhury, asm.raju@samsung.com")]
- public static void Color_READ_WRITE()
+ public void Color_READ_WRITE()
{
/* TEST CODE */
_boxView.Color = Color.Red;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PCST")]
[Property("AUTHOR", "Abu Sina Md. Raju Chowdhury, asm.raju@samsung.com")]
- public static void ColorProperty_READ_ONLY()
+ public void ColorProperty_READ_ONLY()
{
/* TEST CODE */
_boxView.Color = Color.Green;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MCST")]
[Property("AUTHOR", "Abu Sina Md. Raju Chowdhury, asm.raju@samsung.com")]
- public static void OnSizeRequest_CHECK_RETURN()
+ public void OnSizeRequest_CHECK_RETURN()
{
/*TEST CODE*/
CustomBoxView customBoxView = new CustomBoxView();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Razin Farhan Hussain, razin.fh@samsung.com")]
- public static void ButtonContentLayout_INIT()
+ public void ButtonContentLayout_INIT()
{
/* TEST CODE */
-
var buttonContentLayout = new Button.ButtonContentLayout(Button.ButtonContentLayout.ImagePosition.Bottom, 5.0);
Assert.IsNotNull(buttonContentLayout, "Object is null after initialize");
Assert.IsInstanceOf<Button.ButtonContentLayout>(buttonContentLayout);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Razin Farhan Hussain, razin.fh@samsung.com")]
- public static void Position_READ_ONLY()
+ public void Position_READ_ONLY()
{
/* TEST CODE */
-
var positionBottom = new Button.ButtonContentLayout(Button.ButtonContentLayout.ImagePosition.Bottom, 5.0);
Assert.IsNotNull(positionBottom, "Object is null after initialize");
Assert.AreEqual(positionBottom.Position, Button.ButtonContentLayout.ImagePosition.Bottom, "Image position of positionBottom should be Bottom.");
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Razin Farhan Hussain, razin.fh@samsung.com")]
- public static void Spacing_READ_ONLY()
+ public void Spacing_READ_ONLY()
{
/* TEST CODE */
var spacing = new Button.ButtonContentLayout(Button.ButtonContentLayout.ImagePosition.Bottom, 5.0);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Razin Farhan Hussain, razin.fh@samsung.com")]
- public static void ButtonContentTypeConverter_INIT()
+ public void ButtonContentTypeConverter_INIT()
{
/* TEST CODE */
var buttonContentTypeConverter = new Button.ButtonContentTypeConverter();
Assert.AreEqual(12.3,Math.Round(myConfig.Element.FontSize,1), "FontSize of myConfig.Element value & FontSize of _button should be equal");
}
- //[Test]
- [Category("P1")]
- [Description("Check whether Clicked events can be invoked or not when the Button object is clicked.")]
- [Property("SPEC", "Xamarin.Forms.Button.Clicked E")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "EVL")]
- [Property("AUTHOR", "Nguyen Van Tan, nguyen.vtan@samsung.com")]
- public void Clicked_CHECK_EVENT()
- {
- /*TEST CODE*/
- Assert.True(false, "[NA]Manual TC.");
- }
}
}
}
}
- private static TestCell _cell;
+ private TestCell _cell;
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
Console.WriteLine("BoundsTypeConverterTests --------------- Setup()");
_cell = new TestCell()
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Console.WriteLine("BoundsTypeConverterTests --------------- TearDown()");
}