Xamarin.Forms/Xamarin.Forms.Core.UnitTests/PointCollectionTests.cs

24 строки
584 B
C#
Исходник Постоянная ссылка Обычный вид История

[Enhancement] Shapes (Path) (#9264) * Added Path definition in Core (Shapes) Implemented Path in Android and iOS * Fixed Android build errors * Fixed UWP Build * Fixed WPF Build * Implemented PathRenderer on UWP * Added unit tests * Fixed namespaces conflicts in Platform projects * Changes to fix the build errors * Implemented Path Transformations in Android and iOS * Fixed Build error in WPF and UWP * Implemented Path Transformations in UWP * Fixed iOS Build error * Changes to fix the Build (Path namespace conflict) * More changes to fix the build error * Fixed Windows Build errors * Fixed Path size issue on UWP * Added Shapes_Experimental flag * Updated path sample * Updated Android ShapeRenderer size logic * Added Shape Aspect sample in Core Gallery * Added more Shapes samples * Updated UWP PathRenderer size logic * Updated droid and iOS pathRenderer size logic (same behavior in all the platforms) * Updated UWP ShapeRenderer * Implemented Path in WPF Backend * Fixed build error * Initial Clip implementation in WPF and UWP (work in progress) * Added Path implementation on macOS * Added Clip implementation in Android, iOS and macOS * Fixed broken unit tests * Notify the change of Geometry if any of the child properties changed * Added new sample clipping different views * Fixed flipped shape issue on macOS * Added support to Clip using EllipseGeometry, LineGeometry and RectangleGeometry in UWP * Changed Shape class to be abstract * Moved Shapes to Xamarin.Forms.Shapes in Android, iOS and macOS * Moved Shapes to Xamarin.Forms.Shapes namespace in Windows (UWP and WPF) * Fixed wrong property in LineGeometry * Fixed build error * Added Clip Performance sample in Core Gallery * Update Matrix.cs * Update RectangleGeometry.cs * Update Xamarin.Forms.Platform.macOS.csproj * Some duplicate classes * Update PointCollectionTests.cs * Update ImageButtonRenderer.cs * Update Xamarin.Forms.Platform.iOS.csproj * Update Xamarin.Forms.Platform.iOS.csproj * Fixed tabs error Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com> fixes #2452 (partially) fixes #9178
2020-06-09 17:14:53 +03:00
using NUnit.Framework;
namespace Xamarin.Forms.Shapes.UnitTests
{
public class PointCollectionTests
{
2020-09-29 13:15:44 +03:00
PointCollectionConverter _pointCollectionConverter;
[Enhancement] Shapes (Path) (#9264) * Added Path definition in Core (Shapes) Implemented Path in Android and iOS * Fixed Android build errors * Fixed UWP Build * Fixed WPF Build * Implemented PathRenderer on UWP * Added unit tests * Fixed namespaces conflicts in Platform projects * Changes to fix the build errors * Implemented Path Transformations in Android and iOS * Fixed Build error in WPF and UWP * Implemented Path Transformations in UWP * Fixed iOS Build error * Changes to fix the Build (Path namespace conflict) * More changes to fix the build error * Fixed Windows Build errors * Fixed Path size issue on UWP * Added Shapes_Experimental flag * Updated path sample * Updated Android ShapeRenderer size logic * Added Shape Aspect sample in Core Gallery * Added more Shapes samples * Updated UWP PathRenderer size logic * Updated droid and iOS pathRenderer size logic (same behavior in all the platforms) * Updated UWP ShapeRenderer * Implemented Path in WPF Backend * Fixed build error * Initial Clip implementation in WPF and UWP (work in progress) * Added Path implementation on macOS * Added Clip implementation in Android, iOS and macOS * Fixed broken unit tests * Notify the change of Geometry if any of the child properties changed * Added new sample clipping different views * Fixed flipped shape issue on macOS * Added support to Clip using EllipseGeometry, LineGeometry and RectangleGeometry in UWP * Changed Shape class to be abstract * Moved Shapes to Xamarin.Forms.Shapes in Android, iOS and macOS * Moved Shapes to Xamarin.Forms.Shapes namespace in Windows (UWP and WPF) * Fixed wrong property in LineGeometry * Fixed build error * Added Clip Performance sample in Core Gallery * Update Matrix.cs * Update RectangleGeometry.cs * Update Xamarin.Forms.Platform.macOS.csproj * Some duplicate classes * Update PointCollectionTests.cs * Update ImageButtonRenderer.cs * Update Xamarin.Forms.Platform.iOS.csproj * Update Xamarin.Forms.Platform.iOS.csproj * Fixed tabs error Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com> fixes #2452 (partially) fixes #9178
2020-06-09 17:14:53 +03:00
2020-09-29 13:15:44 +03:00
[SetUp]
public void SetUp()
{
_pointCollectionConverter = new PointCollectionConverter();
}
[Enhancement] Shapes (Path) (#9264) * Added Path definition in Core (Shapes) Implemented Path in Android and iOS * Fixed Android build errors * Fixed UWP Build * Fixed WPF Build * Implemented PathRenderer on UWP * Added unit tests * Fixed namespaces conflicts in Platform projects * Changes to fix the build errors * Implemented Path Transformations in Android and iOS * Fixed Build error in WPF and UWP * Implemented Path Transformations in UWP * Fixed iOS Build error * Changes to fix the Build (Path namespace conflict) * More changes to fix the build error * Fixed Windows Build errors * Fixed Path size issue on UWP * Added Shapes_Experimental flag * Updated path sample * Updated Android ShapeRenderer size logic * Added Shape Aspect sample in Core Gallery * Added more Shapes samples * Updated UWP PathRenderer size logic * Updated droid and iOS pathRenderer size logic (same behavior in all the platforms) * Updated UWP ShapeRenderer * Implemented Path in WPF Backend * Fixed build error * Initial Clip implementation in WPF and UWP (work in progress) * Added Path implementation on macOS * Added Clip implementation in Android, iOS and macOS * Fixed broken unit tests * Notify the change of Geometry if any of the child properties changed * Added new sample clipping different views * Fixed flipped shape issue on macOS * Added support to Clip using EllipseGeometry, LineGeometry and RectangleGeometry in UWP * Changed Shape class to be abstract * Moved Shapes to Xamarin.Forms.Shapes in Android, iOS and macOS * Moved Shapes to Xamarin.Forms.Shapes namespace in Windows (UWP and WPF) * Fixed wrong property in LineGeometry * Fixed build error * Added Clip Performance sample in Core Gallery * Update Matrix.cs * Update RectangleGeometry.cs * Update Xamarin.Forms.Platform.macOS.csproj * Some duplicate classes * Update PointCollectionTests.cs * Update ImageButtonRenderer.cs * Update Xamarin.Forms.Platform.iOS.csproj * Update Xamarin.Forms.Platform.iOS.csproj * Fixed tabs error Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com> fixes #2452 (partially) fixes #9178
2020-06-09 17:14:53 +03:00
2020-09-29 13:15:44 +03:00
[Test]
public void ConvertStringToPointCollectionTest()
{
PointCollection result = _pointCollectionConverter.ConvertFromInvariantString("0 48, 0 144, 96 150, 100 0, 192 0, 192 96, 50 96, 48 192, 150 200 144 48") as PointCollection;
[Enhancement] Shapes (Path) (#9264) * Added Path definition in Core (Shapes) Implemented Path in Android and iOS * Fixed Android build errors * Fixed UWP Build * Fixed WPF Build * Implemented PathRenderer on UWP * Added unit tests * Fixed namespaces conflicts in Platform projects * Changes to fix the build errors * Implemented Path Transformations in Android and iOS * Fixed Build error in WPF and UWP * Implemented Path Transformations in UWP * Fixed iOS Build error * Changes to fix the Build (Path namespace conflict) * More changes to fix the build error * Fixed Windows Build errors * Fixed Path size issue on UWP * Added Shapes_Experimental flag * Updated path sample * Updated Android ShapeRenderer size logic * Added Shape Aspect sample in Core Gallery * Added more Shapes samples * Updated UWP PathRenderer size logic * Updated droid and iOS pathRenderer size logic (same behavior in all the platforms) * Updated UWP ShapeRenderer * Implemented Path in WPF Backend * Fixed build error * Initial Clip implementation in WPF and UWP (work in progress) * Added Path implementation on macOS * Added Clip implementation in Android, iOS and macOS * Fixed broken unit tests * Notify the change of Geometry if any of the child properties changed * Added new sample clipping different views * Fixed flipped shape issue on macOS * Added support to Clip using EllipseGeometry, LineGeometry and RectangleGeometry in UWP * Changed Shape class to be abstract * Moved Shapes to Xamarin.Forms.Shapes in Android, iOS and macOS * Moved Shapes to Xamarin.Forms.Shapes namespace in Windows (UWP and WPF) * Fixed wrong property in LineGeometry * Fixed build error * Added Clip Performance sample in Core Gallery * Update Matrix.cs * Update RectangleGeometry.cs * Update Xamarin.Forms.Platform.macOS.csproj * Some duplicate classes * Update PointCollectionTests.cs * Update ImageButtonRenderer.cs * Update Xamarin.Forms.Platform.iOS.csproj * Update Xamarin.Forms.Platform.iOS.csproj * Fixed tabs error Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com> fixes #2452 (partially) fixes #9178
2020-06-09 17:14:53 +03:00
2020-09-29 13:15:44 +03:00
Assert.IsNotNull(result);
Assert.AreEqual(10, result.Count);
}
}
[Enhancement] Shapes (Path) (#9264) * Added Path definition in Core (Shapes) Implemented Path in Android and iOS * Fixed Android build errors * Fixed UWP Build * Fixed WPF Build * Implemented PathRenderer on UWP * Added unit tests * Fixed namespaces conflicts in Platform projects * Changes to fix the build errors * Implemented Path Transformations in Android and iOS * Fixed Build error in WPF and UWP * Implemented Path Transformations in UWP * Fixed iOS Build error * Changes to fix the Build (Path namespace conflict) * More changes to fix the build error * Fixed Windows Build errors * Fixed Path size issue on UWP * Added Shapes_Experimental flag * Updated path sample * Updated Android ShapeRenderer size logic * Added Shape Aspect sample in Core Gallery * Added more Shapes samples * Updated UWP PathRenderer size logic * Updated droid and iOS pathRenderer size logic (same behavior in all the platforms) * Updated UWP ShapeRenderer * Implemented Path in WPF Backend * Fixed build error * Initial Clip implementation in WPF and UWP (work in progress) * Added Path implementation on macOS * Added Clip implementation in Android, iOS and macOS * Fixed broken unit tests * Notify the change of Geometry if any of the child properties changed * Added new sample clipping different views * Fixed flipped shape issue on macOS * Added support to Clip using EllipseGeometry, LineGeometry and RectangleGeometry in UWP * Changed Shape class to be abstract * Moved Shapes to Xamarin.Forms.Shapes in Android, iOS and macOS * Moved Shapes to Xamarin.Forms.Shapes namespace in Windows (UWP and WPF) * Fixed wrong property in LineGeometry * Fixed build error * Added Clip Performance sample in Core Gallery * Update Matrix.cs * Update RectangleGeometry.cs * Update Xamarin.Forms.Platform.macOS.csproj * Some duplicate classes * Update PointCollectionTests.cs * Update ImageButtonRenderer.cs * Update Xamarin.Forms.Platform.iOS.csproj * Update Xamarin.Forms.Platform.iOS.csproj * Fixed tabs error Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com> fixes #2452 (partially) fixes #9178
2020-06-09 17:14:53 +03:00
}