go
This commit is contained in:
41
C4IT.API.CustomerPanelTests/CustomerPanelControllerTest.cs
Normal file
41
C4IT.API.CustomerPanelTests/CustomerPanelControllerTest.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using C4IT.API.Contracts;
|
||||
using Matrix42.Pandora.Contracts;
|
||||
using Matrix42.Pandora.Contracts.Internationalization;
|
||||
using Moq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using update4u.SPS.DataLayer;
|
||||
using System.Net.Http.Formatting;
|
||||
|
||||
namespace C4IT.API.CustomerPanelTests
|
||||
{
|
||||
public class CustomerPanelControllerTest
|
||||
{
|
||||
|
||||
[Test]
|
||||
public void GetVersion_ShouldReturnDefaultVersion_WhenDataIsInvalid()
|
||||
{
|
||||
// Arrange
|
||||
var expectedDefaultVersion = new Version(0, 0, 0, 0);
|
||||
|
||||
// Act
|
||||
CustomerPanelHelper customerPanelHelper = new CustomerPanelHelper();
|
||||
customerPanelHelper.getVersion();
|
||||
|
||||
// Assert
|
||||
Assert.That(customerPanelHelper.getVersion(), Is.EqualTo(expectedDefaultVersion));
|
||||
}
|
||||
|
||||
// Tests
|
||||
|
||||
// GetVersion_HandlesExceptions
|
||||
// GetVersion_ReturnsDefaultVersion_WhenDataTableIsNull
|
||||
// GetVersion_ReturnsDefaultVersion_WhenDataTableIsEmpty
|
||||
// GetVersion_ReturnsDefaultVersion_WhenDatabaseQueryFails
|
||||
// GetVersion_ReturnsCorrectVersion_WhenDatabaseQuerySucceeds
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user