sharee.bike-App/SharedBusinessLogic.Tests/ViewModel/Bikes/Bike/TestBikeViewModelBase.cs

34 lines
957 B
C#
Raw Permalink Normal View History

2022-01-22 18:30:23 +01:00
using NUnit.Framework;
2024-04-09 12:53:23 +02:00
using ShareeBike.ViewModel.Bikes.Bike;
2022-01-22 18:30:23 +01:00
2024-04-09 12:53:23 +02:00
namespace SharedBusinessLogic.Tests.ViewModel.Bikes.Bike
2022-01-22 18:30:23 +01:00
{
2022-09-06 16:08:19 +02:00
[TestFixture]
public class TestBikeViewModelBase
{
[Test]
public void TestGetUrl()
{
Assert.That(
BikeViewModelBase.GetUrlFirstOrDefault(@"Mit der Mietrad Anmietung wird folgender Betreiber <a href='https://shareeapp-fr01.copri.eu/site/agb.html' target='_blank'>AGB</a> zugestimmt (als Demo sharee AGB)."),
Is.EqualTo(@"https://shareeapp-fr01.copri.eu/site/agb.html"));
}
2022-01-22 18:30:23 +01:00
2022-09-06 16:08:19 +02:00
[Test]
public void TestGetUrlNoProtocol()
{
Assert.That(
BikeViewModelBase.GetUrlFirstOrDefault(@"Mit der Mietrad Anmietung wird folgender Betreiber <a href='shareeapp-fr01.copri.eu/site/agb.html' target='_blank'>AGB</a> zugestimmt (als Demo sharee AGB)."),
Is.EqualTo(""));
}
2022-01-22 18:30:23 +01:00
2022-09-06 16:08:19 +02:00
[Test]
public void TestGetUrlNull()
{
Assert.That(
BikeViewModelBase.GetUrlFirstOrDefault(null),
Is.EqualTo(""));
}
}
2022-01-22 18:30:23 +01:00
}