xamarin-macios/tests/monotouch-test/UIKit/TableViewCellTest.cs

34 строки
791 B
C#
Исходник Обычный вид История

2016-05-26 16:06:52 +03:00
// Copyright 2011 Xamarin Inc. All rights reserved
#if !__WATCHOS__ && !MONOMAC
2016-05-26 16:06:52 +03:00
using System;
using System.Drawing;
using CoreGraphics;
2016-05-26 16:06:52 +03:00
using Foundation;
using UIKit;
using ObjCRuntime;
2016-05-26 16:06:52 +03:00
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
2016-05-26 16:06:52 +03:00
[TestFixture]
[Preserve (AllMembers = true)]
public class TableViewCellTest {
2016-05-26 16:06:52 +03:00
[Test]
public void InitWithFrame ()
{
var frame = new CGRect (10, 10, 100, 100);
2016-05-26 16:06:52 +03:00
using (UITableViewCell tvc = new UITableViewCell (frame)) {
Assert.That (tvc.Frame.X, Is.EqualTo ((nfloat) 0.0f), "X");
Assert.That (tvc.Frame.Y, Is.EqualTo ((nfloat) 0.0f), "Y");
// whatever supplied value X and Y are set to 0.0 by the cell
// Width and Height are set by the cell (e.g. 320 x 44 for the iPhone)
}
}
}
}
#endif // !__WATCHOS__