public void GetSourceDirectory_TestNormalSuccess() { Options options = new Options(); string bootstrapProject = @"c:\test\bootstrap\"; string expected = @"c:\test\bootstrap\assets"; options.BootstrapProjectPath = bootstrapProject; string actual = CommonSupport.GetSourceDirectory(options); if (string.IsNullOrEmpty(actual)) { Assert.IsTrue(false); } else { Assert.AreEqual(expected, actual); } }
public void GetSourceDirectory_TestOverideSuccess() { Options options = new Options(); string bootstrapProject = @"c:\test\override\"; string expected = @"c:\test\override\assets"; options.AllowHtmlEditing = true; options.BootStrapOverrideHtml = bootstrapProject; string actual = CommonSupport.GetSourceDirectory(options); if (string.IsNullOrEmpty(actual)) { Assert.IsTrue(false); } else { Assert.AreEqual(expected, actual); } }
public void GetDestinationDirectory_TestNormalFailure() { Options options = new Options(); string blazorProject = @"c:\test\BlazorServer"; string expected = @"c:\test\BlazorServer\wwwroot\assets"; options.BlazorProjectPath = blazorProject; options.HostAssetsDirectory = @"wwwroot\assets"; string actual = CommonSupport.GetDestinationDirectory(options); if (string.IsNullOrEmpty(actual)) { Assert.IsTrue(false); } else { Assert.AreNotEqual(expected, actual); } }