-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formflow: Bring tests back to life. Still 2 failing but all others pa…
…ssing and form test program working end to end. (#4742)
- Loading branch information
1 parent
81232b0
commit fdc73d8
Showing
11 changed files
with
786 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. | ||
// | ||
// Microsoft Bot Framework: http://botframework.com | ||
// | ||
// Bot Builder SDK GitHub: | ||
// https://github.com/Microsoft/BotBuilder | ||
// | ||
// Copyright (c) Microsoft Corporation | ||
// All rights reserved. | ||
// | ||
// MIT License: | ||
// Permission is hereby granted, free of charge, to any person obtaining | ||
// a copy of this software and associated documentation files (the | ||
// "Software"), to deal in the Software without restriction, including | ||
// without limitation the rights to use, copy, modify, merge, publish, | ||
// distribute, sublicense, and/or sell copies of the Software, and to | ||
// permit persons to whom the Software is furnished to do so, subject to | ||
// the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be | ||
// included in all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, | ||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
|
||
using Microsoft.Bot.Builder.FormFlow; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace FormTest.Models.SimpleSandwich | ||
{ | ||
public enum SandwichOptions | ||
{ | ||
BLT, BlackForestHam, BuffaloChicken, ChickenAndBaconRanchMelt, ColdCutCombo, MeatballMarinara, | ||
OvenRoastedChicken, RoastBeef, RotisserieStyleChicken, SpicyItalian, SteakAndCheese, SweetOnionTeriyaki, Tuna, | ||
TurkeyBreast, Veggie | ||
}; | ||
public enum LengthOptions { SixInch, FootLong }; | ||
public enum BreadOptions { NineGrainWheat, NineGrainHoneyOat, Italian, ItalianHerbsAndCheese, Flatbread }; | ||
public enum CheeseOptions { American, MontereyCheddar, Pepperjack }; | ||
public enum ToppingOptions | ||
{ | ||
Avocado, BananaPeppers, Cucumbers, GreenBellPeppers, Jalapenos, | ||
Lettuce, Olives, Pickles, RedOnion, Spinach, Tomatoes | ||
}; | ||
public enum SauceOptions | ||
{ | ||
ChipotleSouthwest, HoneyMustard, LightMayonnaise, RegularMayonnaise, | ||
Mustard, Oil, Pepper, Ranch, SweetOnion, Vinegar | ||
}; | ||
|
||
[Serializable] | ||
public class SandwichOrder | ||
{ | ||
public SandwichOptions? Sandwich; | ||
public LengthOptions? Length; | ||
public BreadOptions? Bread; | ||
public CheeseOptions? Cheese; | ||
public List<ToppingOptions> Toppings; | ||
public List<SauceOptions> Sauce; | ||
|
||
public static IForm<SandwichOrder> BuildForm() | ||
{ | ||
return new FormBuilder<SandwichOrder>() | ||
.Message("Welcome to the simple sandwich order bot!") | ||
.Build(); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
CSharp/Tests/FormTest/Resource/DynamicSandwich.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<root> | ||
<resheader name="resmimetype"> | ||
<value>text/microsoft-resx</value> | ||
</resheader> | ||
<resheader name="version"> | ||
<value>2.0</value> | ||
</resheader> | ||
<resheader name="reader"> | ||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
</resheader> | ||
<resheader name="writer"> | ||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
</resheader> | ||
<data name="BadAddress" xml:space="preserve"> | ||
<value>Address must start with a number.</value> | ||
</data> | ||
<data name="Cost" xml:space="preserve"> | ||
<value>Total for your sandwich is {0:C2} is that ok?</value> | ||
</data> | ||
<data name="FreeCookie" xml:space="preserve"> | ||
<value>Free cookie</value> | ||
</data> | ||
<data name="FreeDrink" xml:space="preserve"> | ||
<value>Free drink</value> | ||
</data> | ||
<data name="Processing" xml:space="preserve"> | ||
<value>We are currently processing your sandwich. We will message you the status.</value> | ||
</data> | ||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<root> | ||
<resheader name="resmimetype"> | ||
<value>text/microsoft-resx</value> | ||
</resheader> | ||
<resheader name="version"> | ||
<value>2.0</value> | ||
</resheader> | ||
<resheader name="reader"> | ||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
</resheader> | ||
<resheader name="writer"> | ||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
</resheader> | ||
<data name="BadAddress" xml:space="preserve"> | ||
<value>Adresse doit commencer par un nombre.</value> | ||
</data> | ||
<data name="Cost" xml:space="preserve"> | ||
<value>Total pour votre "sandwich" est {0:C2} est ce correct?</value> | ||
</data> | ||
<data name="FreeCookie" xml:space="preserve"> | ||
<value>Cookie gratuit</value> | ||
</data> | ||
<data name="FreeDrink" xml:space="preserve"> | ||
<value>Boisson gratuite</value> | ||
</data> | ||
<data name="Processing" xml:space="preserve"> | ||
<value>Nous traitons actuellement votre "sandwich". Nous seront vous message le statut.</value> | ||
</data> | ||
</root> |
Oops, something went wrong.