Refactoring and Adding Tests (#58)
* Moving Identity seeding to its own class and method. * Adding tests for AddItem * Added catalog api controller and functional tests Added and cleaned up some comments * Adding integration tests for OrderRepository * Getting integration test for order working with inmemory db
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
namespace Microsoft.eShopWeb.ApplicationCore.Entities
|
||||
{
|
||||
// This can easily be modified to be BaseEntity<T> and public T Id to support different key types.
|
||||
// Using non-generic integer types for simplicity and to ease caching logic
|
||||
public class BaseEntity
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
public decimal UnitPrice { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
public int CatalogItemId { get; set; }
|
||||
// public CatalogItem Item { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace ApplicationCore.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Note: No longer required.
|
||||
/// </summary>
|
||||
public class CatalogImageMissingException : Exception
|
||||
{
|
||||
public CatalogImageMissingException(string message,
|
||||
Exception innerException = null)
|
||||
: base(message, innerException: innerException)
|
||||
{
|
||||
}
|
||||
public CatalogImageMissingException(Exception innerException)
|
||||
: base("No catalog image found for the provided id.",
|
||||
innerException: innerException)
|
||||
{
|
||||
}
|
||||
|
||||
public CatalogImageMissingException() : base()
|
||||
{
|
||||
}
|
||||
|
||||
public CatalogImageMissingException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@ namespace ApplicationCore.Services
|
||||
public string ComposePicUri(string uriTemplate)
|
||||
{
|
||||
return uriTemplate.Replace("http://catalogbaseurltobereplaced", _catalogSettings.CatalogBaseUrl);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user