Skip to content

Commit

Permalink
Release Note clean up (#241)
Browse files Browse the repository at this point in the history
* Fixes #240
Cleaned up release note tools
Created powershell script to build release notes

* Fixed Test Cases for Rename Article
  • Loading branch information
mozts2005 authored Sep 20, 2016
1 parent 69056df commit e842cbd
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 43 deletions.
2 changes: 1 addition & 1 deletion GitVersionConfig.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
next-version: 3.5.0
next-version: 3.5.1
assembly-versioning-scheme: MajorMinorPatch
mode: ContinuousDeployment
build-metadata-padding: 0
Expand Down
2 changes: 0 additions & 2 deletions release.bat

This file was deleted.

2 changes: 1 addition & 1 deletion src/GitVersionConfig.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
next-version: 3.5.0
next-version: 3.5.1
assembly-versioning-scheme: MajorMinorPatch
mode: ContinuousDeployment
build-metadata-padding: 0
Expand Down
30 changes: 15 additions & 15 deletions src/Tests/HelpCenter/ArticleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public class ArticleTests
public void CanGetSingleArticle()
{
var res = api.HelpCenter.Articles.GetArticle(_articleIdWithComments);
Assert.IsNotNull(res.Arcticle);
Assert.IsNotNull(res.Article);
}

[Test]
public void CanGetSingleArticleWithTranslations()
{
var res = api.HelpCenter.Articles.GetArticle(_articleIdWithComments, ArticleSideLoadOptionsEnum.Translations);
Assert.IsNotNull(res.Arcticle);
Assert.Greater(res.Arcticle.Translations.Count, 0);
Assert.IsNotNull(res.Article);
Assert.Greater(res.Article.Translations.Count, 0);
}

[Test]
Expand Down Expand Up @@ -151,21 +151,21 @@ public void CanCreateUpdateAndDeleteArticles()
Body = "The body of my article",
Locale = "en-us"
});
Assert.Greater(res.Arcticle.Id, 0);
Assert.Greater(res.Article.Id, 0);

res.Arcticle.LabelNames = new string[] { "updated" };
var update = api.HelpCenter.Articles.UpdateArticleAsync(res.Arcticle).Result;
Assert.That(update.Arcticle.LabelNames, Is.EqualTo(res.Arcticle.LabelNames));
res.Article.LabelNames = new string[] { "updated" };
var update = api.HelpCenter.Articles.UpdateArticleAsync(res.Article).Result;
Assert.That(update.Article.LabelNames, Is.EqualTo(res.Article.LabelNames));

Assert.True(api.HelpCenter.Articles.DeleteArticle(res.Arcticle.Id.Value));
Assert.True(api.HelpCenter.Articles.DeleteArticle(res.Article.Id.Value));
}

[Test]
public void CanGetSingleArticleWithTranslationsAsync()
{
var res = api.HelpCenter.Articles.GetArticleAsync(_articleIdWithComments, ArticleSideLoadOptionsEnum.Translations).Result;
Assert.IsNotNull(res.Arcticle);
Assert.Greater(res.Arcticle.Translations.Count, 0);
Assert.IsNotNull(res.Article);
Assert.Greater(res.Article.Translations.Count, 0);
}

[Test]
Expand All @@ -190,13 +190,13 @@ public async Task CanCreateUpdateAndDeleteArticlesAsync()
Locale = "en-us"
});

Assert.Greater(res.Arcticle.Id, 0);
Assert.Greater(res.Article.Id, 0);

res.Arcticle.LabelNames = new string[] { "photo", "tripod" };
var update = await api.HelpCenter.Articles.UpdateArticleAsync(res.Arcticle);
Assert.AreEqual(update.Arcticle.LabelNames, res.Arcticle.LabelNames);
res.Article.LabelNames = new string[] { "photo", "tripod" };
var update = await api.HelpCenter.Articles.UpdateArticleAsync(res.Article);
Assert.AreEqual(update.Article.LabelNames, res.Article.LabelNames);

Assert.True(await api.HelpCenter.Articles.DeleteArticleAsync(res.Arcticle.Id.Value));
Assert.True(await api.HelpCenter.Articles.DeleteArticleAsync(res.Article.Id.Value));
}

[Test]
Expand Down
4 changes: 2 additions & 2 deletions src/Tests/HelpCenter/TranslationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void CanListMissingCreateUpdateAndDeleteTranslationsForArticle()
Body = "The body of my article",
Locale = "en-us"
});
long article_id = new_article_res.Arcticle.Id.Value;
long article_id = new_article_res.Article.Id.Value;

var missing_res = api.HelpCenter.Translations.ListMissingTranslationsForArticle(article_id);
Assert.AreEqual(1, missing_res.Count);
Expand Down Expand Up @@ -239,7 +239,7 @@ public async Task CanListMissingCreateUpdateAndDeleteTranslationsForArticleAsync
Body = "The body of my article",
Locale = "en-us"
});
long article_id = new_article_res.Arcticle.Id.Value;
long article_id = new_article_res.Article.Id.Value;

var missing_res = await api.HelpCenter.Translations.ListMissingTranslationsForArticleAsync(article_id);
Assert.That(missing_res.Count, Is.EqualTo(1));
Expand Down
10 changes: 5 additions & 5 deletions src/ZendeskApi_v2/Models/Articles/IndividualArticleResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace ZendeskApi_v2.Models.Articles
{
public class IndividualArticleResponse
{
public class IndividualArticleResponse
{

[JsonProperty("article")]
public Article Arcticle { get; set; }
}
[JsonProperty("article")]
public Article Article { get; set; }
}
}
17 changes: 0 additions & 17 deletions testing.ps1

This file was deleted.

File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions tools/ReleaseNotes.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Param(
[string]$Version = "3.5.1",
[string]$gitHubToken = "$env:GitHubToken"
)

$gitReleaseNotesPath = "$PSScriptRoot\GitReleaseNotes.exe"
Push-Location "$PSScriptRoot\.."
& $gitReleaseNotesPath . /O ReleaseNotes.md /Vers $Version /RepoUrl https://github.com/mozts2005/ZendeskApi_v2 /RepoUsername mozts2005 /RepoT $gitHubToken /AllT /AllL /IssueTrackerUsername mozts /IssueTrackerToken $gitHubToken
Pop-Location

0 comments on commit e842cbd

Please sign in to comment.