Пример #1
0
 public void TestGenerateOutputFileWithEmptyCustomerProduct()
 {
     underTest = new GenerateOutputFile <CustomerProduct>()
     {
         GenericProperty = customerProduct, FileSystem = mockFileSystem.Object, FilePath = filePath
     };
     underTest.Start();
 }
Пример #2
0
        public void TestInitialize()
        {
            mockFileSystem = new Mock <IFileSystem>();
            filePath       = string.Empty;
            loadTemplate   = string.Empty;

            underTest = new GenerateOutputFile <CustomerProduct>();
        }
Пример #3
0
 public void TestGenerateOutputFileWithoutOutputTemplate()
 {
     customerProduct     = BuildCustomerProduct();
     OutputTemplate.Load = null;
     underTest           = new GenerateOutputFile <CustomerProduct>()
     {
         GenericProperty = customerProduct, FileSystem = mockFileSystem.Object, FilePath = filePath
     };
     underTest.Start();
 }
Пример #4
0
        public void TestGenerateOutputFileAsExpected()
        {
            customerProduct     = BuildCustomerProduct();
            OutputTemplate.Load = loadTemplate;
            var filePath = string.Concat(customerProduct.Id, '_', customerProduct.FirstName);

            underTest = new GenerateOutputFile <CustomerProduct>()
            {
                GenericProperty = customerProduct, FileSystem = mockFileSystem.Object, FilePath = filePath
            };
            underTest.Start();

            Assert.AreEqual(underTest.FilePath, filePath);
        }