2022-01-22 18:30:23 +01:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using TINK.ViewModel.Bikes.Bike;
|
|
|
|
|
|
|
|
|
|
namespace TestShareeLib.ViewModel.Bikes.Bike
|
|
|
|
|
{
|
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
|
|
|
|
}
|