???????????????????

 

using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestRefactoring.UnitTests
{
[TestClass]
public class ProductService_UnitTests : ServiceBaseUnitTestClass
{
[TestMethod]
public void ProductService_GetProduct_NormalFlows()
{
ProductService testProductService = new ProductService(mockServiceConnection?? mockServiceReader?? mockServiceWriter);
bool testResult = testProductService.GetProduct("5475684684");
Assert.AreEqual(true?? testResult);
}
[TestMethod]
public void ProductService_GetProduct_ProductIsNull()
{
ProductService testProductService = new ProductService(mockServiceConnection?? mockServiceReader?? mockServiceWriter);
bool testResult = testProductService.GetProduct(string.Empty);
Assert.AreEqual(false?? testResult);
}
}
}

 

 

 

using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestRefactoring.UnitTests
{
[TestClass]
public class ProductService_UnitTests : ServiceBaseUnitTestClass
{
[TestMethod]
public void ProductService_GetProduct_NormalFlows()
{
ProductService testProductService = new ProductService(mockServiceConnection?? mockServiceReader?? mockServiceWriter);
bool testResult = testProductService.GetProduct("5475684684");
Assert.AreEqual(true?? testResult);
}
[TestMethod]
public void ProductService_GetProduct_ProductIsNull()
{
ProductService testProductService = new ProductService(mockServiceConnection?? mockServiceReader?? mockServiceWriter);
bool testResult = testProductService.GetProduct(string.Empty);
Assert.AreEqual(false?? testResult);
}
}
}
????ProductService_UnitTests??
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestRefactoring.UnitTests
{
[TestClass]
public class OrderService_UnitTests : ServiceBaseUnitTestClass
{
[TestMethod]
public void OrderService_GetOrders_NormalFlows()
{
OrderService testOrderService = new OrderService(mockServiceConnection?? mockServiceReader?? mockServiceWriter);
bool testResult = testOrderService.GetOrders("10293884");
Assert.AreEqual(true?? testResult);
}
[TestMethod]
public void OrderService_GetOrders_OrderIdIsNull()
{
OrderService testOrderService = new OrderService(mockServiceConnection?? mockServiceReader?? mockServiceWriter);
bool testResult = testOrderService.GetOrders(string.Empty);
Assert.AreEqual(false?? testResult);
}
}
}