public void TestAddingDuplicateTestAttribute() { var testData = new TestData(); testData.Add("dupe", true); testData.Add("dupe", true); }
public void TestResettingContent() { var testData = new TestData(); testData.Add("meh", true); testData.Add("meh2", true); testData.Reset(); Assert.IsTrue(testData.Count == 0); }
public void TestPrintingEntireTestDataContent() { var testData = new TestData(); testData.Add("Firstname", "John"); testData.Add("Lastname", "Smith"); testData.Add("Age", 22); testData.Add("Paid", true); var result = testData.Print(); Assert.IsTrue(result.Contains("Firstname : John")); Assert.IsTrue(result.Contains("Paid : True")); }
protected override void SetTestData() { MatchAward matchAward = new MatchAward() { Id = "Bulwark", HyperlinkId = "EndOfMatchBulwark", Name = "Bulwark", Description = new TooltipDescription("Highest damage soaked"), Tag = "AwBK", MVPScreenImageFileName = "image_bulwark.png", ScoreScreenImageFileName = "image_scorescreen_bulwark.png", }; TestData.Add(matchAward); MatchAward matchAward2 = new MatchAward() { Id = "Killer", HyperlinkId = "EndOfMatchKiller", Name = "Killer", Description = new TooltipDescription("Most Kills"), Tag = "AwKL", MVPScreenImageFileName = "image_killer.png", ScoreScreenImageFileName = "image_scorescreen_killer.png", }; TestData.Add(matchAward2); }
/// <summary> /// Adds a piece of test data to an internal collection. /// </summary> /// <param name="dataPoint"></param> public void AddTestData(FatigueTestDataPoint dataPoint) { lock (_objLock) { TestData.Add(dataPoint); } }
public OrdinalizeTests() { TestData.Add("0", "0th"); TestData.Add("1", "1st"); TestData.Add("2", "2nd"); TestData.Add("3", "3rd"); TestData.Add("4", "4th"); TestData.Add("5", "5th"); TestData.Add("6", "6th"); TestData.Add("7", "7th"); TestData.Add("8", "8th"); TestData.Add("9", "9th"); TestData.Add("10", "10th"); TestData.Add("11", "11th"); TestData.Add("12", "12th"); TestData.Add("13", "13th"); TestData.Add("14", "14th"); TestData.Add("20", "20th"); TestData.Add("21", "21st"); TestData.Add("22", "22nd"); TestData.Add("23", "23rd"); TestData.Add("24", "24th"); TestData.Add("100", "100th"); TestData.Add("101", "101st"); TestData.Add("102", "102nd"); TestData.Add("103", "103rd"); TestData.Add("104", "104th"); TestData.Add("110", "110th"); TestData.Add("1000", "1000th"); TestData.Add("1001", "1001st"); }
protected override void SetTestData() { EmoticonPack emoticonPack = new EmoticonPack() { Name = "Orphea Pack 1", Id = "OrpheaPack1", Description = new TooltipDescription("Emoticon pack for Orphea"), HyperlinkId = "OrpheaPack1", CollectionCategory = "Nexus", EventName = "EvilTower", SortName = "xxOrpheaPack1", ReleaseDate = new DateTime(2018, 4, 3), }; emoticonPack.AddEmoticonId("orphea_sad"); emoticonPack.AddEmoticonId("orphea_happy"); emoticonPack.AddEmoticonId("orphea_happy"); TestData.Add(emoticonPack); EmoticonPack emoticonPack2 = new EmoticonPack() { Name = "Orphea Pack 2", Id = "OrpheaPack2", CollectionCategory = "Nexus", ReleaseDate = new DateTime(2018, 4, 3), }; TestData.Add(emoticonPack2); }
protected override void SetTestData() { VoiceLine voiceLine = new VoiceLine() { Name = "Common1", Id = "Common1", AttributeId = "AB01", SortName = string.Empty, Description = new TooltipDescription(string.Empty), HyperlinkId = "Common1Id", ReleaseDate = new DateTime(2016, 5, 21), }; TestData.Add(voiceLine); VoiceLine voiceLine2 = new VoiceLine() { Name = "Common2", Id = "Common2", AttributeId = "AB02", SortName = "xxCommon2", Description = new TooltipDescription("some voice talking"), HyperlinkId = "Common2Id", ReleaseDate = new DateTime(2014, 5, 21), }; TestData.Add(voiceLine2); }
protected override void SetTestData() { RewardPortrait rewardPortrait = new RewardPortrait() { Name = "Whitemane Cat", Id = "WhitemaneCat", HyperlinkId = "WhitemaneCatId", CollectionCategory = "AchievementCategory", Description = new TooltipDescription("This is some description"), DescriptionUnearned = new TooltipDescription("This is an unearned description"), HeroId = "Aba", IconSlot = 27, Rarity = Rarity.Epic, PortraitPackId = "LagForce", }; rewardPortrait.TextureSheet.Image = "this_is_an_image_file.dds"; rewardPortrait.TextureSheet.Columns = 8; rewardPortrait.TextureSheet.Rows = 8; TestData.Add(rewardPortrait); RewardPortrait rewardPortrait2 = new RewardPortrait() { Name = "Whitemane Bat", Id = "WhitemaneBat", HyperlinkId = "WhitemaneBatId", }; rewardPortrait2.TextureSheet.Image = "this_is_an_image_file.dds"; rewardPortrait2.TextureSheet.Columns = 8; rewardPortrait2.TextureSheet.Rows = 8; TestData.Add(rewardPortrait2); }
protected override void SetTestData() { Banner banner = new Banner() { Name = "Wizard Warbanner", Id = "WizardWarbanner", AttributeId = "WWZ", SortName = "22WizardWarbanner", Rarity = Rarity.Rare, Description = new TooltipDescription("Magically infused warbanner"), HyperlinkId = "WizardWarbannerId", ReleaseDate = new DateTime(2016, 5, 21), CollectionCategory = "Warcraft", EventName = "Wizards", }; TestData.Add(banner); Banner banner2 = new Banner() { Name = "Orc Warbanner", Id = "OrcWarbanner", AttributeId = "OWO", SortName = "11OrcWarbanner", Rarity = Rarity.Legendary, Description = new TooltipDescription("Orc infused warbanner"), HyperlinkId = "OrcWarbannerId", ReleaseDate = new DateTime(2016, 5, 21), CollectionCategory = "Warcraft", }; TestData.Add(banner2); }
protected override void SetTestData() { PortraitPack portrait = new PortraitPack() { Name = "Lag Force", Id = "LagForce", SortName = "xxLagForce", HyperlinkId = "LagForceId", EventName = "SunsOut", Rarity = Rarity.Epic, }; portrait.RewardPortraitIds.Add("WhitemaneCat"); portrait.RewardPortraitIds.Add("WhitemaneHat"); portrait.RewardPortraitIds.Add("Kitty"); TestData.Add(portrait); PortraitPack portrait2 = new PortraitPack() { Name = "00 Force", Id = "00Force", SortName = "xx00Force", HyperlinkId = "00ForceId", Rarity = Rarity.Epic, }; TestData.Add(portrait2); }
protected override void SetTestData() { HeroSkin heroSkin = new HeroSkin() { Name = "Bone Abathur", Id = "AbathurBone", HyperlinkId = "AbathurBone", SortName = "xxAbathurBone", Rarity = Rarity.None, AttributeId = "Aba1", InfoText = new TooltipDescription("Evolution Master of Kerrigan's Swarm"), SearchText = "White Pink", ReleaseDate = new DateTime(2014, 3, 13), }; heroSkin.Features.Add("ThemedAbilities"); heroSkin.Features.Add("ThemedAbilities"); heroSkin.Features.Add("ThemedAnimations"); TestData.Add(heroSkin); HeroSkin heroSkin2 = new HeroSkin() { Name = "Mecha Abathur", Id = "AbathurMechaVar1", HyperlinkId = "AbathurMecha", SortName = "xxyAbathurMecha", Rarity = Rarity.Legendary, AttributeId = "Aba2", ReleaseDate = new DateTime(2014, 3, 1), }; TestData.Add(heroSkin2); }
protected override void SetTestData() { Emoticon emoticon = new Emoticon() { Name = "Lunara Angry", Id = "lunara_angry", Description = new TooltipDescription("Use emoticons for lunara"), HyperlinkId = string.Empty, HeroId = "Lunara", HeroSkinId = "LunaraWitch", }; emoticon.Image.FileName = "emoticon_image.png"; emoticon.Image.Count = 2; emoticon.Image.DurationPerFrame = 1000; emoticon.Image.Width = 34; emoticon.AddLocalizedAlias(":lunaraangry:"); emoticon.AddLocalizedAlias(":lunaangry:"); emoticon.AddLocalizedAlias(":lunaangry:"); emoticon.AddUniversalAlias(":("); emoticon.AddUniversalAlias("(:"); emoticon.AddUniversalAlias("(:"); emoticon.TextureSheet.Image = "emoticon_image_texture.png"; TestData.Add(emoticon); Emoticon emoticon2 = new Emoticon() { Name = "Lunara Sad", Id = "lunara_sad", IsHidden = true, }; TestData.Add(emoticon2); }
public DasherizeTests() { //Just replaces underscore with a dash TestData.Add("some_title", "some-title"); TestData.Add("some-title", "some-title"); TestData.Add("some_title_goes_here", "some-title-goes-here"); TestData.Add("some_title and_another", "some-title and-another"); }
public HumanizeTests() { //Capitalizes the first word, lowercases the rest and turns underscores into spaces TestData.Add("some_title", "Some title"); TestData.Add("some-title", "Some-title"); TestData.Add("Some_title", "Some title"); TestData.Add("someTitle", "Sometitle"); TestData.Add("someTitle_Another", "Sometitle another"); }
public void TestRetrieveSimpleStringTestAttribute() { var testData = new TestData(); testData.Add("meh", "the-val"); var expectedResult = testData.Get("meh"); Assert.AreEqual("the-val", expectedResult); }
public UnderscoreTests() { //Makes an underscored lowercase string TestData.Add("SomeTitle", "some_title"); TestData.Add("someTitle", "some_title"); TestData.Add("some title", "some_title"); TestData.Add("some title that will be underscored", "some_title_that_will_be_underscored"); TestData.Add("SomeTitleThatWillBeUnderscored", "some_title_that_will_be_underscored"); }
public void TestRetrievingSingleAttributeWithCast() { var testData = new TestData(); testData.Add("meh", true); var value = testData.Get <bool>("meh"); Assert.AreEqual(value, true); }
public MainWindow() { InitializeComponent(); for (int i = 0; i < 20; i++) { TestData.Add(new TestClass { MyProperty = GetRandomText(), MyProperty2 = GetRandomText(), MyProperty3 = GetRandomText() }); } }
public UncapitalizeTests() { //Just lowers the first char and leaves the rest alone TestData.Add("some title", "some title"); TestData.Add("some Title", "some Title"); TestData.Add("SOMETITLE", "sOMETITLE"); TestData.Add("someTitle", "someTitle"); TestData.Add("some title goes here", "some title goes here"); TestData.Add("some TITLE", "some TITLE"); }
public TitleizeTests() { //Uppercases individual words and removes some characters TestData.Add("some title", "Some Title"); TestData.Add("some-title", "Some Title"); TestData.Add("sometitle", "Sometitle"); TestData.Add("some-title: The begining", "Some Title: The Begining"); TestData.Add("some_title:_the_begining", "Some Title: The Begining"); TestData.Add("some title: The_begining", "Some Title: The Begining"); }
public PascalizeAndCamelizeTests() { TestData.Add("customer", "Customer"); TestData.Add("CUSTOMER", "CUSTOMER"); TestData.Add("CUStomer", "CUStomer"); TestData.Add("customer_name", "CustomerName"); TestData.Add("customer_first_name", "CustomerFirstName"); TestData.Add("customer_first_name_goes_here", "CustomerFirstNameGoesHere"); TestData.Add("customer name", "Customer name"); }
public CapitalizeTests() { //Capitalizes the first char and lowers the rest of the string TestData.Add("some title", "Some title"); TestData.Add("some Title", "Some title"); TestData.Add("SOMETITLE", "Sometitle"); TestData.Add("someTitle", "Sometitle"); TestData.Add("some title goes here", "Some title goes here"); TestData.Add("some TITLE", "Some title"); }
protected override void SetTestData() { Portrait portrait = new Portrait() { Name = "Lag Force", Id = "LagForce", SortName = "xxLagForce", HyperlinkId = "LagForceId", EventName = "SunsOut", }; TestData.Add(portrait); }
public CDev(int idNo, string name = "", int chanNum = 8) { this._idNo = idNo; this._name = name; this.ChanMax = chanNum; for (int i = 0; i < chanNum; i++) { SerialNo.Add(""); Result.Add(0); TestData.Add(""); } }
public CStat(int idNo, string name, int flowId, string flowName, int slotMax) { this._idNo = idNo; this._name = name; this._slotMax = slotMax; this.FlowId = flowId; this.FlowName = flowName; for (int i = 0; i < slotMax; i++) { SerialNo.Add(""); Result.Add(0); TestData.Add(""); } }
protected override void SetTestData() { Spray spray = new Spray() { Name = "Carbot Li Li", Id = "CarbotLiLi", AttributeId = "CLL", SortName = "33CarbotLiLi", Rarity = Rarity.Rare, SearchText = "Carbot Li LI", Description = new TooltipDescription("Carbot spray of Li Li"), HyperlinkId = "CarbotLiLiId", ReleaseDate = new DateTime(2016, 5, 21), CollectionCategory = "HeroStorm", EventName = "Carbot", AnimationCount = 5, AnimationDuration = 100, }; spray.TextureSheet.Image = "carbotspray.png"; TestData.Add(spray); Spray spray2 = new Spray() { Name = "Carbot Chen", Id = "CarbotChen", AttributeId = "CCH", SortName = "33CarbotChen", Rarity = Rarity.Epic, SearchText = "Carbot Chen", HyperlinkId = "CarbotChenId", ReleaseDate = new DateTime(2016, 5, 21), CollectionCategory = "HeroStorm", }; spray2.TextureSheet.Image = "carbotspray.png"; TestData.Add(spray2); }
private void InitializeData() { TrainData.Clear(); var outMin = double.MaxValue; var outMax = double.MinValue; for (var i = Min; i <= Max; i += Step) { var expected = Function(i); if (expected > outMax) { outMax = expected; } if (expected < outMin) { outMin = expected; } var point = new TrainingData { Input = new Array3D(Normalize(i, Min, Max)), Expected = new Array3D(expected) }; TrainData.Add(point); } foreach (var data in TrainData) { data.Expected[0] = Normalize(data.Expected[0], outMin, outMax); } TestData.Clear(); for (var i = 0; i < TrainData.Count; i++) { var x = Rand.NextDouble() * (Max - Min) + Min; TestData.Add(new TrainingData { Input = new Array3D(Normalize(x, Min, Max)), Expected = new Array3D(Normalize(Function(x), outMin, outMax)) }); } }
protected override void SetTestData() { Announcer announcer = new Announcer() { Name = "Orphea", Id = "OrpheaA", AttributeId = "OE3", SortName = "qqOrpheaA", Rarity = Rarity.Rare, Description = new TooltipDescription("Orphea Announcer"), HyperlinkId = "OrpheaAId", ReleaseDate = new DateTime(2016, 5, 21), CollectionCategory = "Realm", Gender = "Female", HeroId = "Orphea", ImageFileName = "announcer_orphea.dds", }; TestData.Add(announcer); Announcer announcer2 = new Announcer() { Name = "Murky", Id = "MurkyA", AttributeId = "ME3", SortName = "qqMurkyA", Rarity = Rarity.Rare, HyperlinkId = "MurkyAId", ReleaseDate = new DateTime(2016, 5, 21), CollectionCategory = "Warcraft", Gender = "Male", HeroId = "Murkey", ImageFileName = "announcer_murkey.dds", }; TestData.Add(announcer2); }
protected override void SetTestData() { Mount mount = new Mount() { Name = "Cloud Nine", Id = "CloudNine", AttributeId = "CN9", SortName = "99CloudeNine", Rarity = Rarity.Rare, SearchText = "Blue", InfoText = new TooltipDescription("A floating cloud"), HyperlinkId = "CloudNine", ReleaseDate = new DateTime(2016, 5, 21), CollectionCategory = "Magical", MountCategory = "Ride", EventName = "WhimsyDale", }; TestData.Add(mount); Mount mount2 = new Mount() { Name = "Magic Carpet", Id = "MagixCarpet", AttributeId = "MC4", SortName = "xxMagixCarpet", Rarity = Rarity.Epic, SearchText = "Blue", InfoText = new TooltipDescription("A flying magic carpet"), HyperlinkId = "MagicCarpet", ReleaseDate = new DateTime(2018, 4, 1), CollectionCategory = "Magical", MountCategory = "Ride", }; TestData.Add(mount2); }
public void Setup() { scenario = new Scenario() { Name = "foo", Description = "bar", TestDataRows = new List<TestData>(), Interactions = new List<Interaction>() }; var interaction1 = new Interaction() { Name = "Step 1", DataItems = new List<DataItem>() }; var interaction2 = new Interaction() { Name = "Step 2", DataItems = new List<DataItem>() }; var dataItem = new DataItem() { Name = "param1" }; var dataItem2 = new DataItem() { Name = "param2" }; interaction1.DataItems.Add(dataItem); interaction1.DataItems.Add(dataItem2); interaction2.DataItems.Add(dataItem); interaction2.DataItems.Add(dataItem2); var testData1 = new TestData(); testData1.Add("param1", "foo"); testData1.Add("param2", "bar"); var testData2 = new TestData(); testData2.Add("param1", "foo"); testData2.Add("param2", "bar"); scenario.Interactions.Add(interaction1); scenario.Interactions.Add(interaction2); scenario.TestDataRows.Add(testData1); scenario.TestDataRows.Add(testData2); scenarios = new List<Item>(); scenarios.Add(scenario); built = builder.Build(scenarios); }